func (hl *Highlighter) variable(token parse.Item) { if token.Typ == parse.ItemBare { if _, err := hl.ev.ResolveVar(token.Val); err == nil { token.Typ = ItemValidVariable } else { token.Typ = ItemInvalidVariable } } hl.items <- token }
func (hl *Highlighter) variable(token parse.Item) { if token.Typ == parse.ItemBare { // XXX Disabled until Compiler implements it if true { // if _, err := hl.ev.ResolveVar(token.Val); err == nil { token.Typ = ItemValidVariable } else { token.Typ = ItemInvalidVariable } } hl.items <- token }
func (hl *Highlighter) command(token parse.Item) { if token.Typ == parse.ItemSpace { hl.items <- token token = <-hl.lexer.Chan() } if token.Typ == parse.ItemBare { // Check validity of command if _, _, err := hl.ev.ResolveCommand(token.Val); err == nil { token.Typ = ItemValidCommand } else { token.Typ = ItemInvalidCommand } } hl.items <- token }
func (hl *Highlighter) command(token parse.Item) { if token.Typ == parse.ItemSpace { hl.items <- token token = <-hl.lexer.Chan() } if token.Typ == parse.ItemBare { // Check validity of command // XXX Disabled until Compiler implements it if true { // if _, _, err := hl.ev.ResolveCommand(token.Val); err == nil { token.Typ = ItemValidCommand } else { token.Typ = ItemInvalidCommand } } hl.items <- token }