github.com/rsc/tmp@v0.0.0-20240517235954-6deaab19748b/bootstrap/internal/gc/go.errors (about) 1 // Do not edit. Bootstrap copy of /Users/rsc/g/go/src/cmd/internal/gc/go.errors 2 3 //line /Users/rsc/g/go/src/cmd/internal/gc/go.errors:1 4 // Copyright 2010 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 // Example-based syntax error messages. 9 // See yaccerrors.go. 10 11 package gc 12 13 var yymsg = []struct { 14 yystate int 15 yychar int 16 msg string 17 }{ 18 // Each line of the form % token list 19 // is converted by yaccerrors.go into the yystate and yychar caused 20 // by that token list. 21 22 % loadsys package LIMPORT '(' LLITERAL import_package import_there ',' 23 "unexpected comma during import block"}, 24 25 % loadsys package LIMPORT LNAME ';' 26 "missing import path; require quoted string"}, 27 28 % loadsys package imports LFUNC LNAME '(' ')' '{' LIF if_header ';' 29 "missing { after if clause"}, 30 31 % loadsys package imports LFUNC LNAME '(' ')' '{' LSWITCH if_header ';' 32 "missing { after switch clause"}, 33 34 % loadsys package imports LFUNC LNAME '(' ')' '{' LFOR for_header ';' 35 "missing { after for clause"}, 36 37 % loadsys package imports LFUNC LNAME '(' ')' '{' LFOR ';' LBODY 38 "missing { after for clause"}, 39 40 % loadsys package imports LFUNC LNAME '(' ')' ';' '{' 41 "unexpected semicolon or newline before {"}, 42 43 % loadsys package imports LTYPE LNAME ';' 44 "unexpected semicolon or newline in type declaration"}, 45 46 % loadsys package imports LCHAN '}' 47 "unexpected } in channel type"}, 48 49 % loadsys package imports LCHAN ')' 50 "unexpected ) in channel type"}, 51 52 % loadsys package imports LCHAN ',' 53 "unexpected comma in channel type"}, 54 55 % loadsys package imports LFUNC LNAME '(' ')' '{' if_stmt ';' LELSE 56 "unexpected semicolon or newline before else"}, 57 58 % loadsys package imports LTYPE LNAME LINTERFACE '{' LNAME ',' LNAME 59 "name list not allowed in interface type"}, 60 61 % loadsys package imports LFUNC LNAME '(' ')' '{' LFOR LVAR LNAME '=' LNAME 62 "var declaration not allowed in for initializer"}, 63 64 % loadsys package imports LVAR LNAME '[' ']' LNAME '{' 65 "unexpected { at end of statement"}, 66 67 % loadsys package imports LFUNC LNAME '(' ')' '{' LVAR LNAME '[' ']' LNAME '{' 68 "unexpected { at end of statement"}, 69 70 % loadsys package imports LFUNC LNAME '(' ')' '{' LDEFER LNAME ';' 71 "argument to go/defer must be function call"}, 72 73 % loadsys package imports LVAR LNAME '=' LNAME '{' LNAME ';' 74 "need trailing comma before newline in composite literal"}, 75 76 % loadsys package imports LVAR LNAME '=' comptype '{' LNAME ';' 77 "need trailing comma before newline in composite literal"}, 78 79 % loadsys package imports LFUNC LNAME '(' ')' '{' LFUNC LNAME 80 "nested func not allowed"}, 81 82 % loadsys package imports LFUNC LNAME '(' ')' '{' LIF if_header loop_body LELSE ';' 83 "else must be followed by if or statement block"}, 84 }