Changeset 1987906
- Timestamp:
- 12/07/2018 01:32:06 PM (7 years ago)
- Location:
- easycoder/trunk
- Files:
-
- 3 edited
-
easycoder-min.js (modified) (1 diff)
-
easycoder.js (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
easycoder/trunk/easycoder-min.js
r1987789 r1987906 18 18 a.rewind()}console.log("No handler found");throw Error("I don't understand '"+c+"...'");}},compileOne:function(){var c=a.getToken();if(c){b.warnings=[];var m=b.program.length;c.endsWith(":")?(b.symbols[c.substring(0,c.length-1)]={pc:m},b.index++):a.compileToken()}},compileFromHere:function(c){for(;b.index<b.tokens.length;){var m=b.tokens[b.index].token;if("else"===m)return b.program;a.compileOne();if(-1<c.indexOf(m))break}},compile:function(c){b.tokens=c;b.index=0;b.program=[];b.symbols={};b.warnings= 19 19 [];a.compileFromHere([]);a.addCommand({domain:"core",keyword:"stop",lino:a.getLino(),next:0});return b.program}};g.exports=a},{}],4:[function(d,g,f){var e=Object.assign||function(b){for(var a=1;a<arguments.length;a++){var c=arguments[a],m;for(m in c)Object.prototype.hasOwnProperty.call(c,m)&&(b[m]=c[m])}return b};g.exports={compile:function(b){b.mark();for(var a=$jscomp.makeIterator(Object.keys(b.domain)),c=a.next();!c.done;c=a.next()){if(c=b.domain[c.value].condition.compile(b))return e({domain:name}, 20 c);b.rewind()}},test:function(b,a){return b.domain[a.domain].condition.test(b,a)}}},{}],5:[function(d,g,f){var e=this,b={Add:{compile:function(a){var c=a.getLino() ;a.next();var b=a.getValue();if(a.tokenIs("to"))if(a.next(),a.getToken(),a.isSymbol()){var h=a.getSymbol();if(a.getCommandAt(h.pc).isValueHolder){if("giving"===a.peek()){h=a.getValue();a.next();var d=a.getToken();a.next();a.addCommand({domain:"core",keyword:"add",lino:c,value1:b,value2:h,target:d})}else h=a.getToken(),a.next(),a.addCommand({domain:"core",20 c);b.rewind()}},test:function(b,a){return b.domain[a.domain].condition.test(b,a)}}},{}],5:[function(d,g,f){var e=this,b={Add:{compile:function(a){var c=a.getLino(),b=a.getNextValue();if(a.tokenIs("to"))if(a.next(),a.getToken(),a.isSymbol()){var h=a.getSymbol();if(a.getCommandAt(h.pc).isValueHolder){if("giving"===a.peek()){h=a.getValue();a.next();var d=a.getToken();a.next();a.addCommand({domain:"core",keyword:"add",lino:c,value1:b,value2:h,target:d})}else h=a.getToken(),a.next(),a.addCommand({domain:"core", 21 21 keyword:"add",lino:c,value1:b,target:h});return!0}a.warning("core "+e.name+": Expected value holder")}else{h=a.getValue();if(a.tokenIs("giving"))return a.next(),d=a.getToken(),a.next(),a.addCommand({domain:"core",keyword:"add",lino:c,value1:b,value2:h,target:d}),!0;a.warning("core "+e.name+': Expected "giving"')}return!1},run:function(a){var c=a[a.pc],b=c.value1,h=c.value2,d=a.getSymbolRecord(c.target);if(d.isValueHolder){var e=d.value[d.index];h?(a=a.getValue(h)+a.getValue(b),d.value[d.index]={type:"constant", 22 22 numeric:!0,content:a}):(e.numeric||a.nonNumericValueError(c.lino),a=e.content+a.getValue(b),d.value[d.index]={type:"constant",numeric:!0,content:a})}else a.VariableDoesNotHoldAValueError(c.lino,d.name);return c.pc+1}},Alias:{compile:function(a){var c=a.getLino();a.next();if(a.isSymbol()){var b=a.getToken();a.next();if(a.tokenIs("to")&&(a.next(),a.isSymbol())){var d=a.getToken();a.next();a.addCommand({domain:"core",keyword:"alias",lino:c,alias:b,symbol:d});return!0}}return!1},run:function(a){var c= -
easycoder/trunk/easycoder.js
r1987789 r1987906 343 343 compile: compiler => { 344 344 const lino = compiler.getLino(); 345 compiler.next();346 345 // Get the (first) value 347 const value1 = compiler.get Value();346 const value1 = compiler.getNextValue(); 348 347 if (compiler.tokenIs('to')) { 349 348 compiler.next(); … … 3006 3005 EasyCoder_Run(program, program.resume); 3007 3006 } catch (err) { 3008 const message = 'Error in step handler: ' + err.message;3007 const message = `Error in step handler: ${err.message}`; 3009 3008 console.log(message); 3010 3009 alert(message); -
easycoder/trunk/readme.txt
r1987798 r1987906 6 6 Requires at least: 4.4 7 7 Requires PHP: 5.2 8 Tested up to: 4.9.88 Tested up to: 5.0 9 9 Stable tag: trunk 10 10 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.