Browse Source

Improve readability via static imports.

Timur Sağlam 4 years ago
parent
commit
52e1e84c1c

+ 0 - 1
jplag.frontend.csharp-6/src/main/java/de/jplag/csharp/grammar/CSharpLexerBase.java

@@ -49,7 +49,6 @@ abstract class CSharpLexerBase extends Lexer {
     }
 
     protected void OnColon() {
-
         if (interpolatedStringLevel > 0) {
             int ind = 1;
             boolean switchToFormatString = true;

+ 8 - 5
jplag.frontend.csharp-6/src/main/java/de/jplag/csharp/grammar/CSharpParserBase.java

@@ -3,6 +3,9 @@ package de.jplag.csharp.grammar;
 import org.antlr.v4.runtime.Parser;
 import org.antlr.v4.runtime.TokenStream;
 
+import de.jplag.csharp.grammar.CSharpParser.Local_variable_declarationContext;
+import de.jplag.csharp.grammar.CSharpParser.Local_variable_typeContext;
+
 /**
  * This class was taken from <a href="https://github.com/antlr/grammars-v4/tree/master/csharp">antlr/grammars-v4</a>. It
  * was originally written by Ken Domino. Note that this class is licensed under Eclipse Public License - v 1.0.
@@ -13,13 +16,13 @@ public abstract class CSharpParserBase extends Parser {
     }
 
     protected boolean IsLocalVariableDeclaration() {
-        CSharpParser.Local_variable_declarationContext local_var_decl = (CSharpParser.Local_variable_declarationContext) this._ctx;
-        if (local_var_decl == null)
+        Local_variable_declarationContext localVariable = (Local_variable_declarationContext) this._ctx;
+        if (localVariable == null)
             return true;
-        CSharpParser.Local_variable_typeContext local_variable_type = local_var_decl.local_variable_type();
-        if (local_variable_type == null)
+        Local_variable_typeContext localVariableType = localVariable.local_variable_type();
+        if (localVariableType == null)
             return true;
-        if (local_variable_type.getText().equals("var"))
+        if (localVariableType.getText().equals("var"))
             return false;
         return true;
     }