MCPcopy Create free account
hub / github.com/Koihik/LuaFormatter / chunk

Method chunk

generated/LuaParser.cpp:64–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64LuaParser::ChunkContext* LuaParser::chunk() {
65 ChunkContext *_localctx = _tracker.createInstance<ChunkContext>(_ctx, getState());
66 enterRule(_localctx, 0, LuaParser::RuleChunk);
67 size_t _la = 0;
68
69 auto onExit = finally([=] {
70 exitRule();
71 });
72 try {
73 enterOuterAlt(_localctx, 1);
74 setState(83);
75 _errHandler->sync(this);
76
77 _la = _input->LA(1);
78 if (_la == LuaParser::SHEBANG) {
79 setState(82);
80 match(LuaParser::SHEBANG);
81 }
82 setState(85);
83 block();
84 setState(86);
85 match(LuaParser::EOF);
86
87 }
88 catch (RecognitionException &e) {
89 _errHandler->reportError(this, e);
90 _localctx->exception = std::current_exception();
91 _errHandler->recover(this, _localctx->exception);
92 }
93
94 return _localctx;
95}
96
97//----------------- BlockContext ------------------------------------------------------------------
98

Callers 1

__formatFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected