Module: ThemeCheck::LanguageServer::VariableLookupFinder::TolerantParser::Tags::TolerantBlockBody

Included in:
Case, For, If, TableRow, Unless
Defined in:
lib/theme_check/language_server/variable_lookup_finder/tolerant_parser.rb

Instance Method Summary collapse

Instance Method Details

#parse_body(body, tokens) ⇒ Object

This module defines the tolerant parse body that doesn’t raise syntax errors when a block is not closed. Thus, the tolerant parser can build the AST for templates with this kind of error, which is quite common in language servers.



49
50
51
52
53
# File 'lib/theme_check/language_server/variable_lookup_finder/tolerant_parser.rb', line 49

def parse_body(body, tokens)
  super
rescue StandardError
  false
end