proc eat(p: var Parser; tokType: TokType) {....raises: [Exception, ValueError,
KeyError, OSError, IOError, ERecoverableError], tags: [RootEffect,
ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Move the parser to the next token if the current token is of type tokType, otherwise error.
Source
Edit
proc expectIdent(p: Parser) {....raises: [Exception, ValueError, KeyError, OSError,
IOError, ERecoverableError], tags: [
RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source
Edit
proc expectIdentOrKeyw(p: Parser) {....raises: [Exception, ValueError, KeyError,
OSError, IOError, ERecoverableError], tags: [RootEffect, ReadDirEffect,
WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source
Edit
proc getTok(p: var Parser) {....raises: [Exception, ValueError, KeyError, OSError,
IOError, ERecoverableError], tags: [
RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Get the next token from the parser's lexer, and store it in the parser's tok member.
Source
Edit
proc openParser(p: var Parser; fileIdx: FileIndex; inputStream: PLLStream;
cache: IdentCache; config: ConfigRef) {....raises: [IOError,
Exception, ValueError, KeyError, OSError, ERecoverableError], tags: [
ReadIOEffect, RootEffect, ReadDirEffect, WriteIOEffect, ReadEnvEffect].}
Open a parser, using the given arguments to set up its internal state.
Source
Edit
proc optInd(p: var Parser; n: PNode) {....raises: [KeyError, Exception, ValueError,
OSError, IOError, ERecoverableError], tags: [RootEffect, ReadDirEffect,
WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source
Edit
proc optPar(p: var Parser) {....raises: [Exception, ValueError, KeyError, OSError,
IOError, ERecoverableError], tags: [
RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source
Edit
proc parMessage(p: Parser; msg: TMsgKind; arg: string = "") {....raises: [
Exception, ValueError, KeyError, OSError, IOError, ERecoverableError], tags: [
RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Produce and emit the parser message arg to output.
Source
Edit
proc parseAll(p: var Parser): PNode {....raises: [Exception, ValueError, KeyError,
OSError, IOError, ERecoverableError], tags: [RootEffect, ReadDirEffect,
WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Parses the rest of the input stream held by the parser into a PNode.
Source
Edit
proc parseString(s: string; cache: IdentCache; config: ConfigRef;
filename: string = ""; line: int = 0;
errorHandler: ErrorHandler = nil): PNode {....raises: [IOError,
Exception, ValueError, KeyError, OSError, ERecoverableError], tags: [
ReadIOEffect, RootEffect, ReadDirEffect, WriteIOEffect, ReadEnvEffect].}
Parses a string into an AST, returning the top node. filename and line, although optional, provide info so that the compiler can generate correct error messages referring to the original source.
Source
Edit
proc parseSymbol(p: var Parser; mode = smNormal): PNode {....raises: [Exception,
ValueError, KeyError, OSError, IOError, ERecoverableError], tags: [
RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source
Edit
proc parseTopLevelStmt(p: var Parser): PNode {....raises: [Exception, ValueError,
KeyError, OSError, IOError, ERecoverableError], tags: [RootEffect,
ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Implements an iterator which, when called repeatedly, returns the next top-level statement or emptyNode if end of stream.
Source
Edit
proc skipInd(p: var Parser) {....raises: [Exception, ValueError, KeyError, OSError,
IOError, ERecoverableError], tags: [
RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
Source
Edit