def AaItB.var.same

bend-osdev-apparmor@0.1.0.0 · parse.bend:248

import bend-osdev-apparmor@0.1.0.0/parse.bend as Parse
import Base
import bend-osdev-apparmor@0.1.0.0/token.bend as T
import bend-osdev-apparmor@0.1.0.0/error.bend as E

248# an assignment takes the tokens of its line; a comma there is an error
249def AaItB.var.same(same: Bool, +b: AaItB, t: T.AaTok, +line: U32) -> AaItB:
250  match same:
251    case True{}:
252      match t:
253        case T.AaTWord{w, l}:
254          AaItB.push(b, T.AaTWord{w, l})
255        case T.AaTQuoted{q, l}:
256          AaItB.push(b, T.AaTQuoted{q, l})
257        case _:
258          AaItB.err(b, E.AaErrSyntax{AaItB.file(b), line})
259    case False{}:
260      AaItB.norm(AaItB.flush(b, 2n, line), t)

Uses (10)

Used by (1)