diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-25 21:55:17 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-25 21:57:45 +0900 |
commit | 520bf02582be7ab36b17fd78f8931cfdb702b07f (patch) | |
tree | a1e7ad54915152fce6f96a18312e28f34f256c84 /spec | |
parent | Fix the initial state number (diff) | |
download | tre-520bf02582be7ab36b17fd78f8931cfdb702b07f.tar.gz tre-520bf02582be7ab36b17fd78f8931cfdb702b07f.tar.xz |
Add fragment expression
A fragment entry is defined by an entry whose `fragment` field is `true`, and is referenced by a fragment expression (`\f{...}`).
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/spec.go b/spec/spec.go index e3c318e..61955ac 100644 --- a/spec/spec.go +++ b/spec/spec.go @@ -88,11 +88,12 @@ func (n LexModeNum) IsNil() bool { } type LexEntry struct { - Kind LexKind `json:"kind"` - Pattern LexPattern `json:"pattern"` - Modes []LexModeName `json:"modes"` - Push LexModeName `json:"push"` - Pop bool `json:"pop"` + Kind LexKind `json:"kind"` + Pattern LexPattern `json:"pattern"` + Modes []LexModeName `json:"modes"` + Push LexModeName `json:"push"` + Pop bool `json:"pop"` + Fragment bool `json:"fragment"` } func (e *LexEntry) validate() error { |