mirror of
https://gitee.com/BDWare/genparser
synced 2026-02-14 13:39:25 +00:00
build: config spotless plugin and reformat code
This commit is contained in:
@@ -3,8 +3,8 @@ package org.bdware.sc.parser;
|
||||
import org.antlr.v4.runtime.*;
|
||||
|
||||
/**
|
||||
* All parser methods that used in grammar (p, prev, notLineTerminator, etc.)
|
||||
* should start with lower case char similar to parser rules.
|
||||
* All parser methods that used in grammar (p, prev, notLineTerminator, etc.) should start with
|
||||
* lower case char similar to parser rules.
|
||||
*/
|
||||
public abstract class JavaScriptBaseParser extends Parser {
|
||||
public JavaScriptBaseParser(TokenStream input) {
|
||||
@@ -53,12 +53,12 @@ public abstract class JavaScriptBaseParser extends Parser {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} iff on the current index of the parser's token stream a
|
||||
* token of the given {@code type} exists on the {@code HIDDEN} channel.
|
||||
* Returns {@code true} iff on the current index of the parser's token stream a token of the
|
||||
* given {@code type} exists on the {@code HIDDEN} channel.
|
||||
*
|
||||
* @param type the type of the token on the {@code HIDDEN} channel to check.
|
||||
* @return {@code true} iff on the current index of the parser's token stream a
|
||||
* token of the given {@code type} exists on the {@code HIDDEN} channel.
|
||||
* @return {@code true} iff on the current index of the parser's token stream a token of the
|
||||
* given {@code type} exists on the {@code HIDDEN} channel.
|
||||
*/
|
||||
private boolean here(final int type) {
|
||||
|
||||
@@ -72,14 +72,13 @@ public abstract class JavaScriptBaseParser extends Parser {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} iff on the current index of the parser's token stream a
|
||||
* token exists on the {@code HIDDEN} channel which either is a line terminator,
|
||||
* or is a multi line comment that contains a line terminator.
|
||||
* Returns {@code true} iff on the current index of the parser's token stream a token exists on
|
||||
* the {@code HIDDEN} channel which either is a line terminator, or is a multi line comment that
|
||||
* contains a line terminator.
|
||||
*
|
||||
* @return {@code true} iff on the current index of the parser's token stream a
|
||||
* token exists on the {@code HIDDEN} channel which either is a line
|
||||
* terminator, or is a multi line comment that contains a line
|
||||
* terminator.
|
||||
* @return {@code true} iff on the current index of the parser's token stream a token exists on
|
||||
* the {@code HIDDEN} channel which either is a line terminator, or is a multi line
|
||||
* comment that contains a line terminator.
|
||||
*/
|
||||
protected boolean lineTerminatorAhead() {
|
||||
|
||||
@@ -111,4 +110,4 @@ public abstract class JavaScriptBaseParser extends Parser {
|
||||
return (type == YJSParser.MultiLineComment && (text.contains("\r") || text.contains("\n")))
|
||||
|| (type == YJSParser.LineTerminator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user