Delegate ExpressionPrefixParser
Longest-valid-prefix expression parse over source:
returns true with consumedLength set to the
number of leading characters forming a valid expression (the grammar
decides where a captured RHS ends), or false when not even a
prefix parses. Capture syntaxes take this as an optional hook so the
assignment/tag grammars stay decoupled from any concrete expression
parser (see NcExpressionDialectUtil.TryParsePrefix).
public delegate bool ExpressionPrefixParser(string source, out int consumedLength)
Parameters
sourcestring- Longest-valid-prefix expression parse over source: returns true with consumedLength set to the number of leading characters forming a valid expression (the grammar decides where a captured RHS ends), or false when not even a prefix parses. Capture syntaxes take this as an optional hook so the assignment/tag grammars stay decoupled from any concrete expression parser (see NcExpressionDialectUtil.TryParsePrefix).
consumedLengthint- Longest-valid-prefix expression parse over source: returns true with consumedLength set to the number of leading characters forming a valid expression (the grammar decides where a captured RHS ends), or false when not even a prefix parses. Capture syntaxes take this as an optional hook so the assignment/tag grammars stay decoupled from any concrete expression parser (see NcExpressionDialectUtil.TryParsePrefix).
Returns
- bool
- Longest-valid-prefix expression parse over source: returns true with consumedLength set to the number of leading characters forming a valid expression (the grammar decides where a captured RHS ends), or false when not even a prefix parses. Capture syntaxes take this as an optional hook so the assignment/tag grammars stay decoupled from any concrete expression parser (see NcExpressionDialectUtil.TryParsePrefix).
- Extension Methods