Skip to content
Merged
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
6 changes: 3 additions & 3 deletions compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func savereg(ec *expcontext, reg int) int {

func raiseCompileError(context *funcContext, line int, format string, args ...interface{}) {
msg := fmt.Sprintf(format, args...)
panic(&CompileError{Context: context, Line: line, Message: msg})
panic(&CompileError{context: context, Line: line, Message: msg})
}

func isVarArgReturnExpr(expr ast.Expr) bool {
Expand Down Expand Up @@ -128,13 +128,13 @@ func lnumberValue(expr ast.Expr) (LNumber, bool) {
/* utilities }}} */

type CompileError struct { // {{{
Context *funcContext
context *funcContext
Line int
Message string
}

func (e *CompileError) Error() string {
return fmt.Sprintf("compile error near line(%v) %v: %v", e.Line, e.Context.Proto.SourceName, e.Message)
return fmt.Sprintf("compile error near line(%v) %v: %v", e.Line, e.context.Proto.SourceName, e.Message)
} // }}}

type codeStore struct { // {{{
Expand Down