Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use crate::{
// interpreter. (Even though that gives slightly cleaner error messages).
#[derive(Debug, Error)]
pub enum CompilerError {
#[error("parse error")]
#[error("{0}")]
Parsing(#[from] compiler::ParseError),
#[error("compile error")]
#[error("{0}")]
Compilation(#[from] compiler::CompileError),
}

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ pub enum ParseErrorKind {
ExpressionNotStatement,
#[error("recursion limit reached")]
RecursionLimit,
#[error("lexer error")]
#[error("lexer error: {0}")]
LexError(#[from] LexError),
#[error("invalid attribute {0:?}")]
InvalidAttribute(String),
Expand Down
2 changes: 1 addition & 1 deletion tests/goldenscripts/close-multiple.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- error
--- runtime error: compile error: compiler error at line 4: multiple to-be-closed variables in local list
--- runtime error: compiler error at line 4: multiple to-be-closed variables in local list

local a <close>, b <close> = {}, {}
2 changes: 1 addition & 1 deletion tests/goldenscripts/close-unimpl.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- error
--- runtime error: compile error: compiler error at line 4: close attribute currently unsupported
--- runtime error: compiler error at line 4: close attribute currently unsupported

local c <close> = {}
2 changes: 1 addition & 1 deletion tests/goldenscripts/const1.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- error
--- runtime error: compile error: compiler error at line 5: cannot assign to a const variable
--- runtime error: compiler error at line 5: cannot assign to a const variable

local c <const> = 3
c = 4
2 changes: 1 addition & 1 deletion tests/goldenscripts/const3.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- error
--- runtime error: compile error: compiler error at line 5: cannot assign to a const variable
--- runtime error: compiler error at line 5: cannot assign to a const variable

local a <const> = 3
function a()
Expand Down
2 changes: 1 addition & 1 deletion tests/goldenscripts/const4.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- error
--- runtime error: compile error: compiler error at line 7: cannot assign to a const variable
--- runtime error: compiler error at line 7: cannot assign to a const variable

local a <const> = 3

Expand Down
2 changes: 1 addition & 1 deletion tests/goldenscripts/const5.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- error
--- runtime error: compile error: compiler error at line 7: cannot assign to a const variable
--- runtime error: compiler error at line 7: cannot assign to a const variable

local a <const> = 5

Expand Down
4 changes: 4 additions & 0 deletions tests/goldenscripts/lexer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--- error
--- runtime error: parse error at line 4: lexer error: invalid escape sequence

local p = "\-"