Class: Hamlit::Parser
- Inherits:
-
Temple::Parser
- Object
- Temple::Parser
- Hamlit::Parser
- Includes:
- Hamlit::Parsers::Attribute, Hamlit::Parsers::Comment, Hamlit::Parsers::Doctype, Hamlit::Parsers::Filter, Hamlit::Parsers::Multiline, Hamlit::Parsers::Script, Hamlit::Parsers::Tag, Hamlit::Parsers::Text, Hamlit::Parsers::Whitespace
- Defined in:
- lib/hamlit/parser.rb
Constant Summary collapse
- SKIP_NEWLINE_EXPS =
%i[newline code multi].freeze
- SKIP_NEWLINE_FILTERS =
%w[ruby markdown erb].freeze
Constants included from Hamlit::Parsers::Tag
Hamlit::Parsers::Tag::DEFAULT_TAG, Hamlit::Parsers::Tag::TAG_ID_CLASS_REGEXP, Hamlit::Parsers::Tag::TAG_REGEXP
Constants included from Hamlit::Parsers::Script
Hamlit::Parsers::Script::DEFAULT_SCRIPT_OPTIONS, Hamlit::Parsers::Script::INTERNAL_STATEMENTS
Instance Method Summary collapse
Methods included from Hamlit::Parsers::Whitespace
Methods included from Hamlit::Parsers::Text
Methods included from Hamlit::Parsers::Tag
Methods included from Concerns::Indentable
#count_indent, #count_width, #indent_label, #next_indent, #next_width, #replace_hard_tabs, #reset_indent, #same_indent?, #validate_indentation!, #with_indented
Methods included from Concerns::Error
#assert_scan!, #copmile_error!, #syntax_error, #syntax_error!
Methods included from Hamlit::Parsers::Script
#parse_script, #parse_silent_script
Methods included from Concerns::Included
Methods included from Hamlit::Parsers::Multiline
Methods included from Concerns::LineReader
#current_line, #empty_line?, #next_line, #read_lines, #reset_lines, #skip_lines
Methods included from Hamlit::Parsers::Filter
Methods included from Hamlit::Parsers::Doctype
Methods included from Hamlit::Parsers::Comment
Methods included from Hamlit::Parsers::Attribute
Methods included from Concerns::Balanceable
#balanced_braces_exist?, #balanced_parens_exist?, #fetch_balanced_braces, #fetch_balanced_parentheses
Instance Method Details
#call(template) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/hamlit/parser.rb', line 30 def call(template) reset(template) ast = [:multi] ast += parse_lines ast end |