package
0.0.1
Repository: https://github.com/conflowio/conflow.git
Documentation: pkg.go.dev

# Functions

And will match a logical and expression defined by the following rule, where P is the input parser: S -> P ("&&" P)*.
Array will match an array expression defined by the following rule, where P is the input parser: S -> "[" "]" S -> "[" P ("," P)* "]".
Block returns a parser for parsing blocks S -> ID? TYPE KEY? { (ATTR|S)* } -> ID? TYPE KEY? VALUE ID -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/ TYPE -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/ KEY -> STRING LITERAL ATTR -> ID ("="|":=") P VALUE -> EXPRESSION -> ARRAY -> MAP.
Compare will match comparison expressions defined by the following rule, where P is the input parser: S -> P (COMP_OP P)* COMP_OP -> "==" -> "!=" -> "<" -> "<=" -> ">" -> ">=".
Directive returns a parser for parsing directives S -> "@" ID { (PARAMETER|BLOCK)* } -> ID VALUE VALUE -> EXPRESSION -> ARRAY -> MAP.
Element will match a variable expression defined by the following rule, where P is the input parser: S -> P (VAR_INDEX)* VAR_INDEX -> "." ID -> "[" P "]" ID -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/.
Expression returns with an expression parser.
Function will match a function call defined by the following rule, where P is the input parser: S -> ID "(" PARAMS ")" ID -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/ PARAMS -> EMPTY -> P ("," P)*.
ID parses an identifier: S -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/ An identifier can only contain lowercase letters, numbers and underscore characters.
No description provided by the author
No description provided by the author
Map will match an map expression defined by the following rule, where P is the input parser: S -> "map" "{" "}" S -> "map" "{" (STRING ":" P ",")* "}".
MultilineText parses a multiline text in the following format: ”' first line second line ”' This will result in "first line\nsecond line\n".
Name parses a name expression: S -> ID ID SEP ID ID -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/.
NewMain returns a parser for parsing a main block (a block body) S -> (PARAM|BLOCK)* ID -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/ PARAM -> ID ("="|":=") P VALUE -> EXPRESSION -> ARRAY -> MAP.
Not will match a logical not expression defined by the following rule, where P is the input parser: S -> "!"? P.
Or will match a logical or expression defined by the following rule, where P is the input parser: S -> P ("||" P)*.
Parameter returns with a parameter parser If allowNewAssignment is false then only "=" will be allowed S -> ID ("="|":=") P ID -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/.
ProdMod will match *, /, % arithmetic operations defined by the following rule, where P is the input parser: S -> P (PROD_MOD_OP P)* PROD_MOD_OP -> "*" -> "/" -> "%".
SepByComma applies the given value parser zero or more times separated by comma.
SepByOp applies the given value parser one or more times separated by the op parser.
Sum will match +, - arithmetic operations defined by the following rule, where P is the input parser: S -> P (SUM_OP P)* SUM_OP -> "+" -> "-".
TernaryIf will match a ternary if expression defined by the following rule, where P is the input parser: S -> P -> P "?" P ":" P.
Variable will match a variable expression defined by the following rule, where P is the input parser: S -> ID "." ID ID -> /[a-z][a-z0-9]*(?:_[a-z0-9]+)*/ Variable refers to a named block's parameter, in the format of `<block ID>.<parameter ID>`.

# Structs

Main is the main block parser It will parse a block body (list of params and blocks) and will return with a block with the given id and the type "main".