JS parser: renamed sourceNameStub to comply with a codestyle (UPPERCASE)
This commit is contained in:
@@ -45,7 +45,7 @@ public class JsParser {
|
|||||||
/**
|
/**
|
||||||
* since source maps are not mapped to kotlin source maps
|
* since source maps are not mapped to kotlin source maps
|
||||||
*/
|
*/
|
||||||
private static final String sourceNameStub = "jsCode";
|
private static final String SOURCE_NAME_STUB = "jsCode";
|
||||||
|
|
||||||
private JsParser(JsProgram program) {
|
private JsParser(JsProgram program) {
|
||||||
this.program = program;
|
this.program = program;
|
||||||
@@ -60,7 +60,7 @@ public class JsParser {
|
|||||||
@Override
|
@Override
|
||||||
public void error(String msg, String loc, int ln, String src, int col) {
|
public void error(String msg, String loc, int ln, String src, int col) {
|
||||||
throw new UncheckedJsParserException(new JsParserException(msg, ln,
|
throw new UncheckedJsParserException(new JsParserException(msg, ln,
|
||||||
src, col, sourceNameStub));
|
src, col, SOURCE_NAME_STUB));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -70,7 +70,7 @@ public class JsParser {
|
|||||||
) {
|
) {
|
||||||
// Never called, but just in case.
|
// Never called, but just in case.
|
||||||
throw new UncheckedJsParserException(new JsParserException(msg, ln,
|
throw new UncheckedJsParserException(new JsParserException(msg, ln,
|
||||||
src, col, sourceNameStub));
|
src, col, SOURCE_NAME_STUB));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -81,7 +81,7 @@ public class JsParser {
|
|||||||
try {
|
try {
|
||||||
// Parse using the Rhino parser.
|
// Parse using the Rhino parser.
|
||||||
//
|
//
|
||||||
TokenStream ts = new TokenStream(r, sourceNameStub, rootSourceInfo.getLine());
|
TokenStream ts = new TokenStream(r, SOURCE_NAME_STUB, rootSourceInfo.getLine());
|
||||||
Parser parser = new Parser(new IRFactory(ts), insideFunction);
|
Parser parser = new Parser(new IRFactory(ts), insideFunction);
|
||||||
Node topNode = (Node) parser.parse(ts);
|
Node topNode = (Node) parser.parse(ts);
|
||||||
|
|
||||||
@@ -99,8 +99,8 @@ public class JsParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private JsParserException createParserException(String msg, Node offender) {
|
private static JsParserException createParserException(String msg, Node offender) {
|
||||||
return new JsParserException(msg, offender.getLineno(), null, 0, sourceNameStub);
|
return new JsParserException(msg, offender.getLineno(), null, 0, SOURCE_NAME_STUB);
|
||||||
}
|
}
|
||||||
|
|
||||||
private JsScope getScope() {
|
private JsScope getScope() {
|
||||||
|
|||||||
Reference in New Issue
Block a user