public void Atom(TokenKind kind, AtomNodeBuilder <T> createAtomNode) { Unit(kind, from token in Token(kind) select createAtomNode(token)); }
/// <summary> /// Registers an atom (e.g. numeric coefficient, variable name) /// </summary> /// <param name="kind">Atom unit token kind.</param> /// <param name="atomNodeBuilder">Atom node builder function.</param> public void Atom(TokenKind kind, AtomNodeBuilder <TValue> atomNodeBuilder) { Unit(kind, kind.BindLexeme(l => atomNodeBuilder(l))); }
private void Atom(TokenKind kind, AtomNodeBuilder <Expression> createAtomNode) { Expression.Atom(kind, createAtomNode); }