class Mint::Parser
- Mint::Parser
- Reference
- Object
Defined in:
macros.crparser.cr
parsers/access.cr
parsers/argument.cr
parsers/array_access.cr
parsers/array_destructuring.cr
parsers/array_literal.cr
parsers/basic_expression.cr
parsers/block.cr
parsers/bool_literal.cr
parsers/call.cr
parsers/case.cr
parsers/case_branch.cr
parsers/code_block.cr
parsers/comment.cr
parsers/component.cr
parsers/connect.cr
parsers/connect_variable.cr
parsers/constant.cr
parsers/constant_access.cr
parsers/constant_variable.cr
parsers/css_definition.cr
parsers/css_font_face.cr
parsers/css_keyframes.cr
parsers/css_nested_at.cr
parsers/css_selector.cr
parsers/decode.cr
parsers/directives/asset.cr
parsers/directives/documentation.cr
parsers/directives/format.cr
parsers/directives/inline.cr
parsers/directives/svg.cr
parsers/encode.cr
parsers/enum.cr
parsers/enum_destructuring.cr
parsers/enum_id.cr
parsers/enum_option.cr
parsers/enum_record.cr
parsers/enum_record_definition.cr
parsers/env.cr
parsers/expression.cr
parsers/for.cr
parsers/for_condition.cr
parsers/function.cr
parsers/get.cr
parsers/here_doc.cr
parsers/html_attribute.cr
parsers/html_body.cr
parsers/html_component.cr
parsers/html_element.cr
parsers/html_expression.cr
parsers/html_fragment.cr
parsers/html_style.cr
parsers/if.cr
parsers/inline_function.cr
parsers/interpolation.cr
parsers/js.cr
parsers/member_access.cr
parsers/module.cr
parsers/module_access.cr
parsers/negated_expression.cr
parsers/next_call.cr
parsers/number_literal.cr
parsers/operation.cr
parsers/option.cr
parsers/parenthesized_expression.cr
parsers/pipe.cr
parsers/property.cr
parsers/provider.cr
parsers/record.cr
parsers/record_definition.cr
parsers/record_definition_field.cr
parsers/record_field.cr
parsers/record_update.cr
parsers/regexp_literal.cr
parsers/route.cr
parsers/routes.cr
parsers/spread.cr
parsers/state.cr
parsers/statement.cr
parsers/store.cr
parsers/string_literal.cr
parsers/style.cr
parsers/suite.cr
parsers/test.cr
parsers/top_level.cr
parsers/tuple_destructuring.cr
parsers/tuple_literal.cr
parsers/type.cr
parsers/type_id.cr
parsers/type_variable.cr
parsers/unary_minus.cr
parsers/use.cr
parsers/variable.cr
parsers/void.cr
Constant Summary
-
OPERATORS =
{"|>" => 0, "or" => 0, "!=" => 10, "==" => 10, "<=" => 11, "<" => 11, ">=" => 11, ">" => 11, "-" => 13, "+" => 13, "*" => 14, "/" => 14, "%" => 14, "**" => 15, "&&" => 6, "||" => 5, "!" => 16}
Constructors
Class Method Summary
Macro Summary
Instance Method Summary
- #<<(node)
- #access(lhs : Ast::Expression) : Ast::Expression
- #argument(parse_default_value : Bool = true) : Ast::Argument | Nil
- #array : Ast::ArrayLiteral | Nil
- #array_access(lhs : Ast::Expression) : Ast::Expression
- #array_access_or_call(lhs)
- #array_destructuring : Ast::ArrayDestructuring | Nil
- #asset_directive : Ast::Directives::Asset | Nil
- #ast : Mint::Ast
-
#basic_expression : Ast::Expression | Nil
NOTE The order of the parsing is important!
- #basic_expression!(error : SyntaxError.class) : Ast::Expression
- #block(opening_bracket : SyntaxError.class, closing_bracket : SyntaxError.class, &)
- #block(&)
- #bool_literal : Ast::BoolLiteral | Nil
- #bool_tuple_literal
- #call(lhs : Ast::Expression) : Ast::Expression
- #case_branch(for_css : Bool = false) : Ast::CaseBranch | Nil
- #case_expression(for_css : Bool = false) : Ast::Case | Nil
- #char(next_char : Char, error : SyntaxError.class) : Int32 | Nil
- #char : Char
- #char(error : SyntaxError.class, & : Char -> Bool)
- #char(& : Char -> Bool)
- #char!(next_char : Char)
- #chars(& : Char -> Bool)
- #chars(next_char : Char)
- #chars(*next_chars : Char)
- #chars_until(& : Char -> Bool)
- #chars_until(next_char : Char)
- #chars_until(*next_chars : Char)
- #code_block(opening_bracket : SyntaxError.class, closing_bracket : SyntaxError.class, statement_error : SyntaxError.class = SyntaxError) : Ast::Block | Nil
- #code_block : Ast::Block | Nil
- #comment : Ast::Comment | Nil
- #component : Ast::Component | Nil
- #connect : Ast::Connect | Nil
- #connect_variable
- #constant : Ast::Constant | Nil
- #constant_access : Ast::ModuleAccess | Nil
- #constant_variable : Ast::Variable | Nil
- #css_body
- #css_definition : Ast::CssDefinition | Nil
- #css_definition_or_selector
- #css_font_face : Ast::CssFontFace | Nil
- #css_keyframes : Ast::CssKeyframes | Nil
- #css_nested_at : Ast::CssNestedAt | Nil
- #css_node
- #css_selector(only_definitions : Bool = false) : Ast::CssSelector | Nil
- #css_selector_name : String | Nil
- #data : Ast::Data
- #decode : Ast::Decode | Nil
- #documentation_directive : Ast::Directives::Documentation | Nil
- #encode : Ast::Encode | Nil
- #enum
- #enum_destructuring
- #enum_id
- #enum_id_expressions
- #enum_option
- #enum_record : Ast::EnumRecord | Nil
- #enum_record_definition
- #env : Ast::Env | Nil
- #eof! : Nil
- #eof? : Bool
- #expression : Ast::Expression | Nil
- #expression!(error : SyntaxError.class) : Ast::Expression
- #file : String
- #for_condition : Ast::ForCondition | Nil
- #for_expression : Ast::For | Nil
- #format_directive : Ast::Directives::Format | Nil
- #function : Ast::Function | Nil
- #gather(&) : String | Nil
- #get : Ast::Get | Nil
- #here_doc(with_interpolation : Bool = true) : Ast::HereDoc | Nil
- #here_doc_part(token : String)
- #html_attribute(with_dashes : Bool = true, fixed_name : String | Nil = nil) : Ast::HtmlAttribute | Nil
- #html_body(expected_closing_bracket : SyntaxError.class, expected_closing_tag : SyntaxError.class, tag : Ast::Variable, with_dashes : Bool)
- #html_component : Ast::HtmlComponent | Nil
- #html_content
- #html_element : Ast::HtmlElement | Nil
- #html_expression : Ast::HtmlExpression | Nil
- #html_fragment : Ast::HtmlFragment | Nil
- #html_style : Ast::HtmlStyle | Nil
- #if_expression(for_css = false, for_html = false) : Ast::If | Nil
- #inline_directive : Ast::Directives::Inline | Nil
- #inline_function : Ast::InlineFunction | Nil
- #input : Array(Char)
- #interpolation : Ast::Interpolation | Nil
- #js : Ast::Js | Nil
- #keyword(word) : Bool
- #keyword!(word, error) : Bool
- #keyword_ahead?(word) : Bool
- #letters_numbers_or_dash
- #letters_numbers_or_underscore
- #letters_or_numbers
- #list(terminator : Char | Nil, separator : Char, & : -> T | Nil) : Array(T) forall T
- #many(parse_whitespace : Bool = true, & : -> T | Nil) : Array(T) forall T
- #member_access : Ast::MemberAccess | Nil
- #module_access : Ast::ModuleAccess | Nil
- #module_definition : Ast::Module | Nil
- #negated_expression : Ast::NegatedExpression | Nil
- #next_call : Ast::NextCall | Nil
- #next_char : Char
- #not_interpolation_part(terminator : Char, stop_on_interpolation : Bool = true) : String | Nil
- #number_literal : Ast::NumberLiteral | Nil
- #operation(left : Ast::Expression, operator : String) : Ast::Operation
- #operator : String | Nil
- #option
- #parenthesized_expression : Ast::ParenthesizedExpression | Nil
- #position : Int32
- #prev_char : Char
- #property : Ast::Property | Nil
- #provider : Ast::Provider | Nil
- #raise(error : SyntaxError.class, position : Int32, raw : Hash(String, T)) forall T
- #raise(error : SyntaxError.class, position : Int32)
- #raise(error : SyntaxError.class)
- #record : Ast::Record | Nil
- #record_definition : Ast::RecordDefinition | Nil
- #record_definition_field : Ast::RecordDefinitionField | Nil
- #record_field : Ast::RecordField | Nil
- #record_update : Ast::RecordUpdate | Nil
- #refs : Array({Mint::Ast::Variable, Mint::Ast::Node})
- #regexp_literal : Ast::RegexpLiteral | Nil
-
#rollup_pipe(operation) : Ast::Pipe | Ast::Operation
This method rolls an operation where the operator is "|>" into a single call.
- #route : Ast::Route | Nil
- #routes : Ast::Routes | Nil
- #spread
- #start(&)
- #state : Ast::State | Nil
- #statement : Ast::Statement | Nil
- #step
- #store : Ast::Store | Nil
- #string_literal(with_interpolation : Bool = true) : Ast::StringLiteral | Nil
- #string_literal!(error : SyntaxError.class, with_interpolation : Bool = true) : Ast::StringLiteral
- #style : Ast::Style | Nil
-
#substring(from, to)
Gets substring out of the original string
- #suite : Ast::Suite | Nil
- #svg_directive : Ast::Directives::Svg | Nil
- #test : Ast::Test | Nil
- #top_levels : Nil
- #track_back_whitespace : Nil
- #tuple_destructuring : Ast::TupleDestructuring | Nil
- #tuple_literal : Ast::TupleLiteral | Nil
- #type : Ast::Type | Nil
- #type!(error : SyntaxError.class) : Ast::Type
- #type_id(error : SyntaxError.class) : String | Nil
- #type_id : String | Nil
- #type_id!(error : SyntaxError.class) : String
- #type_or_type_variable
- #type_or_type_variable!(error : SyntaxError.class)
- #type_variable : Ast::TypeVariable | Nil
- #unary_minus : Ast::UnaryMinus | Nil
- #use : Ast::Use | Nil
- #variable(track = true) : Ast::Variable | Nil
- #variable!(error : SyntaxError.class, track = true) : Ast::Variable
- #variable_attribute_name : Ast::Variable | Nil
- #variable_with_dashes(track = true) : Ast::Variable | Nil
- #variable_with_dashes!(error : SyntaxError.class, track = true) : Ast::Variable
- #void : Ast::Void | Nil
- #whitespace : String | Nil
- #whitespace!(error : SyntaxError.class) : String | Nil
- #whitespace?
Constructor Detail
Class Method Detail
Macro Detail
Instance Method Detail
def code_block(opening_bracket : SyntaxError.class, closing_bracket : SyntaxError.class, statement_error : SyntaxError.class = SyntaxError) : Ast::Block | Nil
#
def html_attribute(with_dashes : Bool = true, fixed_name : String | Nil = nil) : Ast::HtmlAttribute | Nil
#
def html_body(expected_closing_bracket : SyntaxError.class, expected_closing_tag : SyntaxError.class, tag : Ast::Variable, with_dashes : Bool)
#
This method rolls an operation where the operator is "|>" into a single call. Every other operation is passed trough.
def string_literal!(error : SyntaxError.class, with_interpolation : Bool = true) : Ast::StringLiteral
#