Class SwiftTarget
java.lang.Object
org.antlr.v4.codegen.Target
org.antlr.v4.codegen.target.SwiftTarget
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class Target
defaultCharValueEscape, gen -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringescapeChar(int v) protected StringescapeWord(String word) For pure strings of Unicode char, how can we display it in the target language as a literal.Methods inherited from class Target
addEscapedChar, addEscapedChar, appendUnicodeEscapedCodePoint, encodeInt16AsCharEscape, escapeIfNeeded, genFile, getAltLabelContextStructName, getBaseListenerFileName, getBaseVisitorFileName, getCodeGenerator, getElementListName, getElementName, getImplicitRuleLabel, getImplicitSetLabel, getImplicitTokenLabel, getInlineTestSetWordSize, getLanguage, getListenerFileName, getListLabel, getLoopCounter, getLoopLabel, getRecognizerFileName, getRuleFunctionContextStructName, getRuleFunctionContextStructName, getSerializedATNSegmentLimit, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromString, getTargetStringLiteralFromString, getTemplates, getTokenTypeAsTargetLabel, getTokenTypesAsTargetLabels, getVersion, getVisitorFileName, grammarSymbolCausesIssueInGeneratedCode, isATNSerializedAsInts, loadTemplates, needsHeader, shouldUseUnicodeEscapeForCodePointInDoubleQuotedString, supportsOverloadedMethods, templatesExist, visibleGrammarSymbolCausesIssueInGeneratedCode, wantsBaseListener, wantsBaseVisitor
-
Field Details
-
targetCharValueEscape
-
reservedWords
-
-
Constructor Details
-
SwiftTarget
-
-
Method Details
-
getTargetCharValueEscape
Description copied from class:TargetFor pure strings of Unicode char, how can we display it in the target language as a literal. Useful for dumping predicates and such that may refer to chars that need to be escaped when represented as strings. Also, templates need to be escaped so that the target language can hold them as a string. Each target can have a different set in memory at same time.- Overrides:
getTargetCharValueEscapein classTarget
-
getReservedWords
- Specified by:
getReservedWordsin classTarget
-
escapeWord
- Overrides:
escapeWordin classTarget
-
escapeChar
- Overrides:
escapeCharin classTarget
-