Package org.antlr.v4.codegen.target
Class JavaScriptTarget
- java.lang.Object
-
- org.antlr.v4.codegen.Target
-
- org.antlr.v4.codegen.target.JavaScriptTarget
-
public class JavaScriptTarget extends Target
-
-
Field Summary
Fields Modifier and Type Field Description protected static HashSet<String>reservedWordsSource: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar-
Fields inherited from class org.antlr.v4.codegen.Target
defaultCharValueEscape, gen
-
-
Constructor Summary
Constructors Constructor Description JavaScriptTarget(CodeGenerator gen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetInlineTestSetWordSize()How many bits should be used to do inline token type tests? Java assumes a 64-bit word for bitsets.protected Set<String>getReservedWords()booleanisATNSerializedAsInts()booleansupportsOverloadedMethods()booleanwantsBaseListener()booleanwantsBaseVisitor()-
Methods inherited from class org.antlr.v4.codegen.Target
addEscapedChar, addEscapedChar, appendUnicodeEscapedCodePoint, encodeInt16AsCharEscape, escapeChar, escapeIfNeeded, escapeWord, genFile, getAltLabelContextStructName, getBaseListenerFileName, getBaseVisitorFileName, getCodeGenerator, getElementListName, getElementName, getImplicitRuleLabel, getImplicitSetLabel, getImplicitTokenLabel, getLanguage, getListenerFileName, getListLabel, getLoopCounter, getLoopLabel, getRecognizerFileName, getRuleFunctionContextStructName, getRuleFunctionContextStructName, getSerializedATNSegmentLimit, getTargetCharValueEscape, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromString, getTargetStringLiteralFromString, getTemplates, getTokenTypeAsTargetLabel, getTokenTypesAsTargetLabels, getVersion, getVisitorFileName, grammarSymbolCausesIssueInGeneratedCode, loadTemplates, needsHeader, shouldUseUnicodeEscapeForCodePointInDoubleQuotedString, templatesExist, visibleGrammarSymbolCausesIssueInGeneratedCode
-
-
-
-
Constructor Detail
-
JavaScriptTarget
public JavaScriptTarget(CodeGenerator gen)
-
-
Method Detail
-
getReservedWords
protected Set<String> getReservedWords()
- Specified by:
getReservedWordsin classTarget
-
getInlineTestSetWordSize
public int getInlineTestSetWordSize()
Description copied from class:TargetHow many bits should be used to do inline token type tests? Java assumes a 64-bit word for bitsets. Must be a valid wordsize for your target like 8, 16, 32, 64, etc...- Overrides:
getInlineTestSetWordSizein classTarget
-
wantsBaseListener
public boolean wantsBaseListener()
- Overrides:
wantsBaseListenerin classTarget
-
wantsBaseVisitor
public boolean wantsBaseVisitor()
- Overrides:
wantsBaseVisitorin classTarget
-
supportsOverloadedMethods
public boolean supportsOverloadedMethods()
- Overrides:
supportsOverloadedMethodsin classTarget
-
isATNSerializedAsInts
public boolean isATNSerializedAsInts()
- Overrides:
isATNSerializedAsIntsin classTarget
-
-