public class StringLiteralTemplateParser extends Object
Modifier and Type | Class and Description |
---|---|
class |
StringLiteralTemplateParser.Expr |
static class |
StringLiteralTemplateParser.ExprKind |
Modifier and Type | Method and Description |
---|---|
static List<StringLiteralTemplateParser.Expr> |
parse(IntPredicate $escapeMatcher,
boolean simpleExprDisabled,
String stringValue)
Parse a string from a string literal using standard template delimiters e.g., "$foo" and "${foo.bar()}",
and return the list of expressions.
|
public static List<StringLiteralTemplateParser.Expr> parse(IntPredicate $escapeMatcher, boolean simpleExprDisabled, String stringValue)
$escapeMatcher
- Given the index of a '$' returns whether or not the '$' is escaped. Command line
compilers filter out the '\' char in the string, so the caller must keep track.
Other parsers, like many IDE parsers, preserve the '\' chars in the string, so
they have a different (and simpler) way of determining escaped '$' chars.simpleExprDisabled
- If true, disables simple $ expressions to support ${} expressions only. Note, this
argument reflects the `manifold.strings.simple.disabled` javac command line option.stringValue
- The value of the string literal as returned by the tokenizer.Copyright © 2024. All rights reserved.