From 17c5c9c14560e9d1695b3cf0758f2dad3c1615f0 Mon Sep 17 00:00:00 2001 From: Oliver Steele Date: Wed, 19 Jul 2017 21:30:25 -0400 Subject: [PATCH] Update expressions.y ParseError -> SyntaxError --- expressions/expressions.y | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/expressions/expressions.y b/expressions/expressions.y index 6304327..b2860dc 100644 --- a/expressions/expressions.y +++ b/expressions/expressions.y @@ -79,7 +79,7 @@ expr2: string: LITERAL { s, ok := $1.(string) if !ok { - panic(ParseError(fmt.Sprintf("expected a string for %q", $1))) + panic(SyntaxError(fmt.Sprintf("expected a string for %q", $1))) } $$ = s }; @@ -108,7 +108,7 @@ loop_modifiers: /* empty */ { $$ = loopModifiers{Cols: math.MaxUint32} } case "reversed": $1.Reversed = true default: - panic(ParseError(fmt.Sprintf("undefined loop modifier %q", $2))) + panic(SyntaxError(fmt.Sprintf("undefined loop modifier %q", $2))) } $$ = $1 } @@ -117,23 +117,23 @@ loop_modifiers: /* empty */ { $$ = loopModifiers{Cols: math.MaxUint32} } case "cols": cols, ok := $3.(int) if !ok { - panic(ParseError(fmt.Sprintf("loop cols must an integer"))) + panic(SyntaxError(fmt.Sprintf("loop cols must an integer"))) } $1.Cols = cols case "limit": limit, ok := $3.(int) if !ok { - panic(ParseError(fmt.Sprintf("loop limit must an integer"))) + panic(SyntaxError(fmt.Sprintf("loop limit must an integer"))) } $1.Limit = &limit case "offset": offset, ok := $3.(int) if !ok { - panic(ParseError(fmt.Sprintf("loop offset must an integer"))) + panic(SyntaxError(fmt.Sprintf("loop offset must an integer"))) } $1.Offset = offset default: - panic(ParseError(fmt.Sprintf("undefined loop modifier %q", $2))) + panic(SyntaxError(fmt.Sprintf("undefined loop modifier %q", $2))) } $$ = $1 }