Here is a list of classic syntax errors, met in every day code. Some common solutions are listed with them, so as to help anyone meeting them.
- :ref:`invalid-numeric-literal`
- :ref:`unclosed-'('`
- :ref:`unclosed-'['`
- :ref:`unclosed-'{'`
- :ref:`unmatched-')'`
- :ref:`unmatched-']'`
- :ref:`unmatched-'}'`
- :ref:`syntax-error,-unexpected-')',-expecting-'|'-or-variable-(t_variable)`
- :ref:`syntax-error,-unexpected-')',-expecting-variable-(t_variable)`
- :ref:`syntax-error,-unexpected-','`
- :ref:`syntax-error,-unexpected-'-',-expecting-'='`
- :ref:`syntax-error,-unexpected-'::'-(t_paamayim_nekudotayim),-expecting-';'-or-','`
- :ref:`syntax-error,-unexpected-'::',-expecting-'('`
- :ref:`syntax-error,-unexpected-';',-expecting-'['`
- :ref:`syntax-error,-unexpected-';',-expecting-'{'`
- :ref:`syntax-error,-unexpected-'[',-expecting-';'-or-','`
- :ref:`syntax-error,-unexpected-'elseif'`
- :ref:`syntax-error,-unexpected-'match'`
- :ref:`syntax-error,-unexpected-'throw'-(t_throw)`
- :ref:`syntax-error,-unexpected-'{'`
- :ref:`syntax-error,-unexpected-'|',-expecting-variable-(t_variable)`
- :ref:`syntax-error,-unexpected-')',-expecting-'='`
- :ref:`syntax-error,-unexpected-end-of-file`
- :ref:`syntax-error,-unexpected-fully-qualified-name-"%s"`
- :ref:`syntax-error,-unexpected-fully-qualified-name-"%s",-expecting-"function"`
- :ref:`syntax-error,-unexpected-fully-qualified-name-"%s",-expecting-"function"-or-"const"`
- :ref:`syntax-error,-unexpected-fully-qualified-name-"%s",-expecting-"{"`
- :ref:`syntax-error,-unexpected-identifier-"%s"`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-")"`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-","-or-";"`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-"]"`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-"function"`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-"function"-or-"const"`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-"{"`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-variable`
- :ref:`syntax-error,-unexpected-identifier-"%s",-expecting-variable-or-"$"`
- :ref:`syntax-error,-unexpected-identifier-"readonly",-expecting-"function"-or-"const"`
- :ref:`syntax-error,-unexpected-integer-"%s",-expecting-")"`
- :ref:`syntax-error,-unexpected-namespaced-name-"%s",-expecting-"function"`
- :ref:`syntax-error,-unexpected-single-quoted-string-"%s",-expecting-")"`
- :ref:`syntax-error,-unexpected-string-content`
- :ref:`syntax-error,-unexpected-token-"#[",-expecting-","-or-";"`
- :ref:`syntax-error,-unexpected-token-"#[",-expecting-"]"`
- :ref:`syntax-error,-unexpected-token-"%"`
- :ref:`syntax-error,-unexpected-token-"%s",-expecting-identifier`
- :ref:`syntax-error,-unexpected-token-"&"`
- :ref:`syntax-error,-unexpected-token-"&",-expecting-end-of-file`
- :ref:`syntax-error,-unexpected-token-"("`
- :ref:`syntax-error,-unexpected-token-"(",-expecting-"::"`
- :ref:`syntax-error,-unexpected-token-"(",-expecting-identifier-or-variable-or-"{"-or-"$"`
- :ref:`syntax-error,-unexpected-token-"(",-expecting-variable`
- :ref:`syntax-error,-unexpected-token-"(int)"`
- :ref:`syntax-error,-unexpected-token-")"`
- :ref:`syntax-error,-unexpected-token-")",-expecting-"="`
- :ref:`syntax-error,-unexpected-token-")",-expecting-"function"-or-"fn"-or-"static"-or-"#["`
- :ref:`syntax-error,-unexpected-token-"*"`
- :ref:`syntax-error,-unexpected-token-","`
- :ref:`syntax-error,-unexpected-token-",",-expecting-")"`
- :ref:`syntax-error,-unexpected-token-",",-expecting-"]"`
- :ref:`syntax-error,-unexpected-token-",",-expecting-variable`
- :ref:`syntax-error,-unexpected-token-",",-expecting-variable-or-"$"`
- :ref:`syntax-error,-unexpected-token-"->"`
- :ref:`syntax-error,-unexpected-token-"->",-expecting-","-or-";"`
- :ref:`syntax-error,-unexpected-token-":"`
- :ref:`syntax-error,-unexpected-token-":",-expecting-")"`
- :ref:`syntax-error,-unexpected-token-":",-expecting-"]"`
- :ref:`syntax-error,-unexpected-token-"::"`
- :ref:`syntax-error,-unexpected-token-"::",-expecting-","-or-";"`
- :ref:`syntax-error,-unexpected-token-"::",-expecting-":"`
- :ref:`syntax-error,-unexpected-token-";"`
- :ref:`syntax-error,-unexpected-token-";",-expecting-"("`
- :ref:`syntax-error,-unexpected-token-";",-expecting-")"`
- :ref:`syntax-error,-unexpected-token-";",-expecting-","-or-")"`
- :ref:`syntax-error,-unexpected-token-";",-expecting-"->"-or-"?->"-or-"["`
- :ref:`syntax-error,-unexpected-token-";",-expecting-"->"-or-"?->"-or-"{"-or-"["`
- :ref:`syntax-error,-unexpected-token-";",-expecting-"]"`
- :ref:`syntax-error,-unexpected-token-";",-expecting-"function"-or-"fn"-or-"static"-or-"#["`
- :ref:`syntax-error,-unexpected-token-";",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-";",-expecting-identifier`
- :ref:`syntax-error,-unexpected-token-"<<"`
- :ref:`syntax-error,-unexpected-token-"="`
- :ref:`syntax-error,-unexpected-token-"=",-expecting-identifier`
- :ref:`syntax-error,-unexpected-token-"=",-expecting-identifier-or-variable-or-"{"-or-"$"`
- :ref:`syntax-error,-unexpected-token-"=",-expecting-variable`
- :ref:`syntax-error,-unexpected-token-">"`
- :ref:`syntax-error,-unexpected-token-"?"`
- :ref:`syntax-error,-unexpected-token-"?->"`
- :ref:`syntax-error,-unexpected-token-"?->",-expecting-","-or-";"`
- :ref:`syntax-error,-unexpected-token-"??"`
- :ref:`syntax-error,-unexpected-token-"--",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-"]"`
- :ref:`syntax-error,-unexpected-token-"__namespace__",-expecting-"("`
- :ref:`syntax-error,-unexpected-token-"as"`
- :ref:`syntax-error,-unexpected-token-"break"`
- :ref:`syntax-error,-unexpected-token-"class",-expecting-"]"`
- :ref:`syntax-error,-unexpected-token-"const"`
- :ref:`syntax-error,-unexpected-token-"continue"`
- :ref:`syntax-error,-unexpected-token-"exit"`
- :ref:`syntax-error,-unexpected-token-"extends"`
- :ref:`syntax-error,-unexpected-token-"extends",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-"extends",-expecting-identifier`
- :ref:`syntax-error,-unexpected-token-"final",-expecting-"("`
- :ref:`syntax-error,-unexpected-token-"if"`
- :ref:`syntax-error,-unexpected-token-"if",-expecting-")"`
- :ref:`syntax-error,-unexpected-token-"if",-expecting-"]"`
- :ref:`syntax-error,-unexpected-token-"implements"`
- :ref:`syntax-error,-unexpected-token-"match"`
- :ref:`syntax-error,-unexpected-token-"match",-expecting-"("`
- :ref:`syntax-error,-unexpected-token-"namespace"`
- :ref:`syntax-error,-unexpected-token-"namespace",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-"new",-expecting-")"`
- :ref:`syntax-error,-unexpected-token-"private",-expecting-"("`
- :ref:`syntax-error,-unexpected-token-"private",-expecting-")"`
- :ref:`syntax-error,-unexpected-token-"private",-expecting-"="`
- :ref:`syntax-error,-unexpected-token-"private",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-"protected",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-"public"`
- :ref:`syntax-error,-unexpected-token-"public",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-"use"`
- :ref:`syntax-error,-unexpected-token-"use",-expecting-","-or-";"`
- :ref:`syntax-error,-unexpected-token-"use",-expecting-"{"`
- :ref:`syntax-error,-unexpected-token-"{"`
- :ref:`syntax-error,-unexpected-token-"{",-expecting-","-or-";"`
- :ref:`syntax-error,-unexpected-token-"{",-expecting-variable`
- :ref:`syntax-error,-unexpected-token-"}"`
- :ref:`syntax-error,-unexpected-token-"}",-expecting-";"-or-"{"`
- :ref:`syntax-error,-unexpected-variable-"%s",-expecting-"("`