Types
Parser = object lex: Lexer prev, curr, next: TokenTuple program: Program memtable: Memtable when compileOption("app", "console"): error: seq[Row] logger*: Logger else: error: string hasErrors*: bool warnings*: seq[Warning] currentSelector: Node imports: Imports memparser: Memparser case ptype: ParserType of Main: projectDirectory: string else: nil filePath: string
Warning = tuple[msg: string, line, col: int]
Procs
proc getMemtable(p: Parser): Memtable {....raises: [], tags: [].}
- Return data stored in memory as Memtable
proc getProgram(p: Parser): Program {....raises: [], tags: [].}
- Return current AST as Program
proc hasWarnings(p: Parser): bool {....raises: [], tags: [].}
proc parseProgram(fpath: string): Parser {. ...raises: [IOError, OSError, Exception, ValueError], tags: [ReadIOEffect, RootEffect, WriteIOEffect].}
- Parse program and return Parser instance
Exports
-
getMessage, newNotice, error, InvalidSyntaxCondStmt, DuplicateSelector, UndefinedPropertyAccessor, InvalidValueCaseStmt, UnknownPseudoClass, warnings, InvalidInfixOperator, warn, errors, error, AssignUndeclaredVar, warn, ConfigLoadingError, InvalidSyntaxLoopStmt, DuplicateVarDeclaration, error, error, InvalidIndentation, DeclaredVariableUnused, UndeclaredCSSSelector, UnrecognizedToken, Level, BadIndentation, TryingAccessNonObject, warn, newInfo, Logger, InvalidSyntaxCaseStmt, newWarningMultiLines, newWarn, UnstablePropertyStatus, VariableRedefinition, UndefinedValueVariable, DuplicateObjectKey, MissingAssignmentToken, UndeclaredVariable, InvalidInfixMissingValue, UnexpectedToken, InternalError, Message, MissingClosingBracketArray, ExtendRedundancyError, MissingClosingObjectBody, newError, Log, DuplicateExtendStatement, DeclaredEmptySelector, warn, InvalidProperty, InvalidNestSelector, newErrorMultiLines, ImportErrorFileNotFound