// Path: src/com/equadon/intellij/mips/lang/psi/MipsTokenTypes.java
// public class MipsTokenTypes {
//   public static final IElementType COMMENT = new MipsElementType("COMMENT");
// 
//   public static final IElementType TAB = new MipsElementType("TAB");
// 
//   /** Token sets */
//   public static final TokenSet WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE, TAB);
//   public static final TokenSet COMMENTS = TokenSet.create(COMMENT);
//   public static final TokenSet STRINGS = TokenSet.create(LQUOTE, QUOTED_STRING, RQUOTE);
// 
//   public static final TokenSet NUMBERS = TokenSet.create(INTEGER_5, INTEGER_16, INTEGER_16U, REAL_NUMBER);
//   public static final TokenSet REGISTERS = TokenSet.create(REGISTER_NAME, REGISTER_NUMBER);
// }
// 
// Path: src/com/equadon/intellij/mips/lang/psi/impl/MipsNamedElementImpl.java
// public class MipsNamedElementImpl extends MipsElementImpl implements MipsNamedElement {
//   public MipsNamedElementImpl(@NotNull ASTNode node) {
//     super(node);
//   }
// 
//   @Override
//   public String getName() {
//     PsiElement element = getNameIdentifier();
//     if (element != null)
//       return getValue(element);
// 
//     return null;
//   }
// 
//   @Nullable
//   @Override
//   public PsiElement getNameIdentifier() {
//     return getFirstChild();
//   }
// 
//   @Override
//   public PsiElement setName(@NotNull String name) throws IncorrectOperationException {
//     return null;
//   }
// 
//   public static String getValue(PsiElement element) {
//     return element.getText();
//   }
// }


import com.equadon.intellij.mips.lang.psi.MipsElementTypes;
import com.equadon.intellij.mips.lang.psi.MipsTokenTypes;
import com.equadon.intellij.mips.lang.psi.impl.MipsNamedElementImpl;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/*
 * Copyright 2017 Niklas Persson
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.equadon.intellij.mips.lang.psi.mixins;



public class MipsRegisterLiteralMixin extends MipsNamedElementImpl {
  public MipsRegisterLiteralMixin(@NotNull ASTNode node) {
    super(node);
  }

  @Nullable
  @Override
  public PsiElement getNameIdentifier() {
// Path: src/com/equadon/intellij/mips/lang/psi/MipsTokenTypes.java
// public class MipsTokenTypes {
//   public static final IElementType COMMENT = new MipsElementType("COMMENT");
// 
//   public static final IElementType TAB = new MipsElementType("TAB");
// 
//   /** Token sets */
//   public static final TokenSet WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE, TAB);
//   public static final TokenSet COMMENTS = TokenSet.create(COMMENT);
//   public static final TokenSet STRINGS = TokenSet.create(LQUOTE, QUOTED_STRING, RQUOTE);
// 
//   public static final TokenSet NUMBERS = TokenSet.create(INTEGER_5, INTEGER_16, INTEGER_16U, REAL_NUMBER);
//   public static final TokenSet REGISTERS = TokenSet.create(REGISTER_NAME, REGISTER_NUMBER);
// }
// 
// Path: src/com/equadon/intellij/mips/lang/psi/impl/MipsNamedElementImpl.java
// public class MipsNamedElementImpl extends MipsElementImpl implements MipsNamedElement {
//   public MipsNamedElementImpl(@NotNull ASTNode node) {
//     super(node);
//   }
// 
//   @Override
//   public String getName() {
//     PsiElement element = getNameIdentifier();
//     if (element != null)
//       return getValue(element);
// 
//     return null;
//   }
// 
//   @Nullable
//   @Override
//   public PsiElement getNameIdentifier() {
//     return getFirstChild();
//   }
// 
//   @Override
//   public PsiElement setName(@NotNull String name) throws IncorrectOperationException {
//     return null;
//   }
// 
//   public static String getValue(PsiElement element) {
//     return element.getText();
//   }
// }


// Path: src/com/equadon/intellij/mips/lang/psi/mixins/MipsRegisterLiteralMixin.java
import com.equadon.intellij.mips.lang.psi.MipsElementTypes;
import com.equadon.intellij.mips.lang.psi.MipsTokenTypes;
import com.equadon.intellij.mips.lang.psi.impl.MipsNamedElementImpl;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/*
 * Copyright 2017 Niklas Persson
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.equadon.intellij.mips.lang.psi.mixins;



public class MipsRegisterLiteralMixin extends MipsNamedElementImpl {
  public MipsRegisterLiteralMixin(@NotNull ASTNode node) {
    super(node);
  }

  @Nullable
  @Override
  public PsiElement getNameIdentifier() {
    return findChildByType(MipsTokenTypes.REGISTERS);