margrave/parser/utils

Search:
Group by:
Source   Edit  

Procs

proc addNewline(parser: MargraveParser; options: static MargraveOptions;
                elem: MargraveElement | seq[MargraveElement])
Source   Edit  
func anyNext(parser: MargraveParser; offset: int = 0): bool {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func anyPrev(parser: MargraveParser; offset: int = 0): bool {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func escapeHtmlChar(ch: char): NativeString {....raises: [], tags: [], forbids: [].}
Escapes &, < and > for html. Source   Edit  
func nextMatch(parser: var MargraveParser; pat: char; offset: int = 0): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func nextMatch(parser: var MargraveParser; pat: char; offset: int = 0; len: int): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func nextMatch(parser: var MargraveParser; pat: openArray[string];
               offset: int = 0): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func nextMatch(parser: var MargraveParser; pat: set[char]; offset: int = 0): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func nextMatch(parser: var MargraveParser; pat: set[char]; offset: int = 0;
               len: int): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
func nextMatch(parser: var MargraveParser; pat: string; offset: int = 0): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func nextWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func noAdjacentWhitespace(parser: MargraveParser; offset: int = 0): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func onlyNextWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func onlyPrevWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func peekMatch(parser: MargraveParser; pat: char; offset: int = 0): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func peekMatch(parser: MargraveParser; pat: char; offset: int = 0; len: Natural): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func peekMatch(parser: MargraveParser; pat: openArray[string]; offset: int = 0): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func peekMatch(parser: MargraveParser; pat: set[char]; offset: int = 0): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func peekMatch(parser: MargraveParser; pat: set[char]; offset: int = 0;
               len: Natural): bool {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func peekMatch(parser: MargraveParser; pat: string; offset: int = 0): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func peekPrevMatch(parser: MargraveParser; pat: char | set[char];
                   offset: int = 0): bool {.inline.}
Source   Edit  
func peekPrevMatch(parser: MargraveParser; pat: string; offset: int = 0): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func prevWhitespace(parser: MargraveParser; offset: int = 0): bool {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
func surroundedWhitespace(parser: MargraveParser; offset: int = 0): bool {.
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  

Iterators

iterator nextChars(parser: var MargraveParser): char {....raises: [], tags: [],
    forbids: [].}
Source   Edit  

Macros

macro match(parserMatcher: MargraveParserVarMatcher): untyped
Source   Edit  
macro matchNext(parser: var MargraveParser; branches: varargs[untyped])
Source   Edit  

Templates

template `case`(parserMatcher: MargraveParserVarMatcher): untyped
Source   Edit  
template get(parser: MargraveParser; offset: int = 0): char
Source   Edit  
template get(parser: MargraveParser; offset: int = 0; len: int): NativeString
Source   Edit  
template noNext(parser: MargraveParser; offset: int = 0): bool
Source   Edit  
template noPrev(parser: MargraveParser; offset: int = 0): bool
Source   Edit  
template withOptions(parser: MargraveParser;
                     compileTimeOptions: static MargraveOptions; cond, body): untyped
Source   Edit  
template withOptions(parser: MargraveParser;
                     compileTimeOptions: static MargraveOptions;
                     cond, body, elseBody): untyped
Source   Edit