blob: f8647722d36a9353a5cc3d64ec1849e889382f6d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
WHITESPACE = _{ " " | "\n" }
ident = @{ ASCII_ALPHA ~ (ASCII_ALPHANUMERIC | "_")* }
vector = { "vector<" ~ typeid ~ ">" }
typeid = { vector | ident }
param = { ident ~ ":" ~ typeid }
param_list = { param* }
typedef = { ident ~ param_list ~ "=" ~ ident ~ ";" }
docdescr = ${ ("\n//-"? ~ !"\n" ~ !"@" ~ ANY)* }
docparam = ${ "@" ~ ident ~ " " ~ docdescr }
docstring = ${ ("//" ~ docparam+ ~ ("\n")+)+ }
section = { "---" ~ ident ~ "---"}
definition = { docstring ~ typedef }
item = _{ definition | section }
tl = _{ SOI ~ (item)* ~ EOI }
|