<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/subexstate.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-04-26 11:04:36 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2023-04-26 11:04:36 +0100
commit48017049f23d3f213fc6e1313f34526d0bba4489 (patch)
treeb363e53f5112589e0cbbd2e1e5e60c6f912ab65c /subex/subexstate.go
parente5965749d17d5a70f92fdc981f863e85b7543838 (diff)
downloadstred-go-48017049f23d3f213fc6e1313f34526d0bba4489.tar
Update subex , literal to no longer include terminals
Diffstat (limited to 'subex/subexstate.go')
-rw-r--r--subex/subexstate.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/subex/subexstate.go b/subex/subexstate.go
index 4655ef9..7ecff0c 100644
--- a/subex/subexstate.go
+++ b/subex/subexstate.go
@@ -203,11 +203,11 @@ func (state SubexCopyStringAtomState) accepting(store Store, outputStack OutputS
}
// Read in an atom and copy it out as long as it is not part of a string
-type SubexCopyNonStringAtomState struct {
+type SubexCopyNonStringNonTerminalAtomState struct {
next SubexState
}
-func (state SubexCopyNonStringAtomState) eat(store Store, outputStack OutputStack, char walk.Atom) []SubexBranch {
- if char.Typ == walk.AtomStringRune || char.Typ == walk.AtomStringTerminal {
+func (state SubexCopyNonStringNonTerminalAtomState) eat(store Store, outputStack OutputStack, char walk.Atom) []SubexBranch {
+ if char.Typ == walk.AtomStringRune || char.Typ == walk.AtomStringTerminal || char.Typ == walk.AtomTerminal {
return nil
}
return []SubexBranch{{
@@ -216,7 +216,7 @@ func (state SubexCopyNonStringAtomState) eat(store Store, outputStack OutputStac
store: store,
}}
}
-func (state SubexCopyNonStringAtomState) accepting(store Store, outputStack OutputStack) []OutputStack {
+func (state SubexCopyNonStringNonTerminalAtomState) accepting(store Store, outputStack OutputStack) []OutputStack {
return nil
}