Skip to content

Commit

Permalink
Parser export fix (#104)
Browse files Browse the repository at this point in the history
* Bump version

* Use ES5 export for parser.js

* Use createParser export
  • Loading branch information
remo5000 authored and martin-henz committed Oct 30, 2018
1 parent 2f38271 commit 5a7c967
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-slang",
"version": "0.1.12",
"version": "0.1.13",
"description": "Javascript-based interpreter for slang, written in Typescript",
"author": {
"name": "Source Academy",
Expand Down
2 changes: 1 addition & 1 deletion src/createContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { toString } from '.';

/** Import meta-circular parser */
const createParserModule = require('./stdlib/parser')
const createParser = createParserModule.default
const createParser = createParserModule.createParser

const GLOBAL = typeof window === 'undefined' ? global : window

Expand Down
2 changes: 1 addition & 1 deletion src/stdlib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
}
*/
export default function createParser() {
exports.createParser = function() {
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,2],$V1=[1,3],$V2=[1,8],$V3=[1,25],$V4=[1,11],$V5=[1,14],$V6=[1,15],$V7=[1,16],$V8=[1,21],$V9=[1,20],$Va=[1,17],$Vb=[1,18],$Vc=[1,19],$Vd=[1,23],$Ve=[1,22],$Vf=[1,24],$Vg=[1,28],$Vh=[1,30],$Vi=[1,31],$Vj=[1,32],$Vk=[1,33],$Vl=[1,34],$Vm=[1,35],$Vn=[1,37],$Vo=[1,38],$Vp=[1,39],$Vq=[1,40],$Vr=[1,29],$Vs=[5,17],$Vt=[5,6,11,13,16,17,22,23,24,25,27,28,30,31,34,35,39,49,57,58,59,60,61,62,64,65,66,67,73],$Vu=[1,51],$Vv=[1,52],$Vw=[1,53],$Vx=[1,54],$Vy=[1,55],$Vz=[1,56],$VA=[1,57],$VB=[1,58],$VC=[1,59],$VD=[1,60],$VE=[1,61],$VF=[1,62],$VG=[1,63],$VH=[1,64],$VI=[1,65],$VJ=[1,66],$VK=[1,67],$VL=[1,69],$VM=[2,78],$VN=[6,15,17,26,34,35,36,37,38,40,41,42,43,44,45,46,47,49,50,51,55,56,69],$VO=[2,49],$VP=[1,85],$VQ=[1,84],$VR=[2,69],$VS=[1,95],$VT=[6,15,17,26,34,35,36,37,38,40,41,42,43,44,45,46,47,50,55,56,69],$VU=[1,125],$VV=[15,50],$VW=[6,15,17,26,34,35,40,41,42,43,44,45,46,47,50,55,56,69],$VX=[6,15,17,26,40,41,42,43,50,55,56,69],$VY=[6,15,17,26,40,41,42,43,44,45,46,47,50,55,56,69],$VZ=[13,16,34,35,39,49,57,58,59,60,61,62,64,65,66,67,73],$V_=[6,15,17,26,50,56,69];
var parser = {trace: function trace() { },
yy: {},
Expand Down

0 comments on commit 5a7c967

Please sign in to comment.