File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -8095,8 +8095,11 @@ const EasyCoder = {
8095
8095
tokens,
8096
8096
scriptLines
8097
8097
} = source ? source : program . source ;
8098
- const lino = this . compiling ? tokens [ EasyCoder_Compiler . getIndex ( ) ] . lino : program [ program . pc ] . lino ;
8099
- var errString = ( this . compiling ? `Compile` : `Runtime` ) + ` error in '${ program . script } '` ;
8098
+ const compiler = EasyCoder_Compiler ;
8099
+ const lino = this . compiling ? tokens [ compiler . getIndex ( ) ] . lino : program [ program . pc ] . lino ;
8100
+ var errString = this . compiling
8101
+ ? `Compile error in '${ compiler . script } '`
8102
+ : `Runtime error in '${ program . script } '` ;
8100
8103
errString += `:\n` ;
8101
8104
var start = lino - 5 ;
8102
8105
start = start < 0 ? 0 : start ;
@@ -8105,7 +8108,7 @@ const EasyCoder = {
8105
8108
errString += nn + ` ` + scriptLines [ n ] . line . split ( `\\s` ) . join ( ` ` ) + `\n` ;
8106
8109
}
8107
8110
errString += `${ err . message } \n` ;
8108
- const warnings = EasyCoder_Compiler . getWarnings ( ) ;
8111
+ const warnings = compiler . getWarnings ( ) ;
8109
8112
if ( warnings . length ) {
8110
8113
errString += `Warnings:\n` ;
8111
8114
for ( const warning of warnings ) {
Original file line number Diff line number Diff line change @@ -43,8 +43,11 @@ const EasyCoder = {
43
43
tokens,
44
44
scriptLines
45
45
} = source ? source : program . source ;
46
- const lino = this . compiling ? tokens [ EasyCoder_Compiler . getIndex ( ) ] . lino : program [ program . pc ] . lino ;
47
- var errString = ( this . compiling ? `Compile` : `Runtime` ) + ` error in '${ program . script } '` ;
46
+ const compiler = EasyCoder_Compiler ;
47
+ const lino = this . compiling ? tokens [ compiler . getIndex ( ) ] . lino : program [ program . pc ] . lino ;
48
+ var errString = this . compiling
49
+ ? `Compile error in '${ compiler . script } '`
50
+ : `Runtime error in '${ program . script } '` ;
48
51
errString += `:\n` ;
49
52
var start = lino - 5 ;
50
53
start = start < 0 ? 0 : start ;
@@ -53,7 +56,7 @@ const EasyCoder = {
53
56
errString += nn + ` ` + scriptLines [ n ] . line . split ( `\\s` ) . join ( ` ` ) + `\n` ;
54
57
}
55
58
errString += `${ err . message } \n` ;
56
- const warnings = EasyCoder_Compiler . getWarnings ( ) ;
59
+ const warnings = compiler . getWarnings ( ) ;
57
60
if ( warnings . length ) {
58
61
errString += `Warnings:\n` ;
59
62
for ( const warning of warnings ) {
You can’t perform that action at this time.
0 commit comments