MCPcopy Create free account
hub / github.com/dop251/goja / parse

Method parse

parser/parser.go:211–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

209}
210
211func (self *_parser) parse() (*ast.Program, error) {
212 self.openScope()
213 defer self.closeScope()
214 self.next()
215 program := self.parseProgram()
216 if false {
217 self.errors.Sort()
218 }
219 return program, self.errors.Err()
220}
221
222func (self *_parser) next() {
223 self.token, self.literal, self.parsedLiteral, self.idx = self.scan()

Callers 8

testParseFunction · 0.45
TestParserErrFunction · 0.45
TestParseDestructFunction · 0.45
TestPositionFunction · 0.45
TestParseTemplateLiteralFunction · 0.45
ParseFileFunction · 0.45
ParseFunctionFunction · 0.45

Calls 6

openScopeMethod · 0.95
closeScopeMethod · 0.95
nextMethod · 0.95
parseProgramMethod · 0.95
SortMethod · 0.80
ErrMethod · 0.80

Tested by 6

testParseFunction · 0.36
TestParserErrFunction · 0.36
TestParseDestructFunction · 0.36
TestPositionFunction · 0.36
TestParseTemplateLiteralFunction · 0.36