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

Function parser

MathBox/mathbox-core.js:32867–33708  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32865]
32866
32867function parser() {
32868 var stmtlist = n(STMTLIST)
32869 , stmt = n(STMT)
32870 , decllist = n(DECLLIST)
32871 , precision = n(PRECISION)
32872 , ident = n(IDENT)
32873 , keyword_or_ident = n(KEYWORD_OR_IDENT)
32874 , fn = n(FUNCTION)
32875 , fnargs = n(FUNCTIONARGS)
32876 , forstmt = n(FORLOOP)
32877 , ifstmt = n(IF)
32878 , whilestmt = n(WHILELOOP)
32879 , returnstmt = n(RETURN)
32880 , dowhilestmt = n(DOWHILELOOP)
32881 , quantifier = n(QUANTIFIER)
32882
32883 var parse_struct
32884 , parse_precision
32885 , parse_quantifier
32886 , parse_forloop
32887 , parse_if
32888 , parse_return
32889 , parse_whileloop
32890 , parse_dowhileloop
32891 , parse_function
32892 , parse_function_args
32893
32894 var stream = through(write, end)
32895 , check = arguments.length ? [].slice.call(arguments) : []
32896 , depth = 0
32897 , state = []
32898 , tokens = []
32899 , whitespace = []
32900 , errored = false
32901 , program
32902 , token
32903 , node
32904
32905 // setup state
32906 state.shift = special_shift
32907 state.unshift = special_unshift
32908 state.fake = special_fake
32909 state.unexpected = unexpected
32910 state.scope = new Scope(state)
32911 state.create_node = function() {
32912 var n = mknode(IDENT, token)
32913 n.parent = stream.program
32914 return n
32915 }
32916
32917 setup_stative_parsers()
32918
32919 // setup root node
32920 node = stmtlist()
32921 node.expecting = '(eof)'
32922 node.mode = STMTLIST
32923 node.token = {type: '(program)', data: '(program)'}
32924 program = node

Callers 1

mathbox-core.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