MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / parser

Function parser

MathBox/mathbox-bundle.js:79552–80393  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79550]
79551
79552function parser() {
79553 var stmtlist = n(STMTLIST)
79554 , stmt = n(STMT)
79555 , decllist = n(DECLLIST)
79556 , precision = n(PRECISION)
79557 , ident = n(IDENT)
79558 , keyword_or_ident = n(KEYWORD_OR_IDENT)
79559 , fn = n(FUNCTION)
79560 , fnargs = n(FUNCTIONARGS)
79561 , forstmt = n(FORLOOP)
79562 , ifstmt = n(IF)
79563 , whilestmt = n(WHILELOOP)
79564 , returnstmt = n(RETURN)
79565 , dowhilestmt = n(DOWHILELOOP)
79566 , quantifier = n(QUANTIFIER)
79567
79568 var parse_struct
79569 , parse_precision
79570 , parse_quantifier
79571 , parse_forloop
79572 , parse_if
79573 , parse_return
79574 , parse_whileloop
79575 , parse_dowhileloop
79576 , parse_function
79577 , parse_function_args
79578
79579 var stream = through(write, end)
79580 , check = arguments.length ? [].slice.call(arguments) : []
79581 , depth = 0
79582 , state = []
79583 , tokens = []
79584 , whitespace = []
79585 , errored = false
79586 , program
79587 , token
79588 , node
79589
79590 // setup state
79591 state.shift = special_shift
79592 state.unshift = special_unshift
79593 state.fake = special_fake
79594 state.unexpected = unexpected
79595 state.scope = new Scope(state)
79596 state.create_node = function() {
79597 var n = mknode(IDENT, token)
79598 n.parent = stream.program
79599 return n
79600 }
79601
79602 setup_stative_parsers()
79603
79604 // setup root node
79605 node = stmtlist()
79606 node.expecting = '(eof)'
79607 node.mode = STMTLIST
79608 node.token = {type: '(program)', data: '(program)'}
79609 program = node

Callers 1

mathbox-bundle.jsFile · 0.70

Calls 4

nFunction · 0.70
throughFunction · 0.70
mknodeFunction · 0.70
setup_stative_parsersFunction · 0.70

Tested by

no test coverage detected