MCPcopy Index your code
hub / github.com/aiscript-dev/aiscript / parseMeta

Function parseMeta

src/parser/syntaxes/toplevel.ts:131–146  ·  view source on GitHub ↗
(s: ITokenStream)

Source from the content-addressed store, hash-verified

129 * ```
130*/
131export function parseMeta(s: ITokenStream): Ast.Meta {
132 const startPos = s.getPos();
133
134 s.expect(TokenKind.Sharp3);
135 s.next();
136
137 let name = null;
138 if (s.is(TokenKind.Identifier)) {
139 name = s.getTokenValue();
140 s.next();
141 }
142
143 const value = parseExpr(s, true);
144
145 return NODE('meta', { name, value }, startPos, value.loc.end);
146}

Callers 1

parseTopLevelFunction · 0.85

Calls 7

parseExprFunction · 0.85
NODEFunction · 0.85
getPosMethod · 0.65
expectMethod · 0.65
nextMethod · 0.65
isMethod · 0.65
getTokenValueMethod · 0.65

Tested by

no test coverage detected