func NewVarIDNode(identToken attrib) (vari.VarID, error) { sourcePosInfo := identToken.(*token.Token).Pos identifierString := string(identToken.(*token.Token).Lit) vari := vari.NewVarID(identifierString) vari.SetSourceInfo(sourcePosInfo) return vari, nil }
func NewVarDeclNode(ident attrib, typeIdent attrib, sourcePosInfo attrib) (interfaces.VarDecl, error) { vari := vari.NewVarDecl(ident.(interfaces.VarID), typeIdent.(interfaces.ValueType)) vari.SetSourceInfo(sourcePosInfo.(token.Pos)) return vari, nil }