ridl-syntax 0.11.0

The RIDL family lexer and grammar: a lossless concrete syntax tree over rowan.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Numeric, string, regex, and duration literals (typl reference §2.4-§2.8).
const A : integer = 0
const B : integer = 42
const C : integer = -40
const D : integer = 042
const E : float = 3.14
const F : float = -40.0
const VIN     = /^[A-HJ-NPR-Z0-9]{17}$/
const ESCAPED = /a\/b\/c/
const GREETING : string = "hello \"world\"\n"
const UNITS : string = "km/h"
type Poll   : ms  [0.0..1000.0]
const T1 : Poll = 10ms
const T2 : Poll = 500us
const T3 : Poll = 1s
const T4 : Poll = 1min
const T5 : Poll = 1.5h
const MINUTES : Name = min