Haml::Scanner
A boundary scanner, NOT a second Crystal parser. Its sole job is to keep commas/braces inside strings, regexes and nested groups from becoming Haml delimiters. Syntax, overloads and types remain Crystal's responsibility.
Deliberate boundary: heredocs and Crystal macro bodies are rejected. Bare
slash regexes work in operand positions. The ambiguous method /regexp/
form is rejected; write method(/regexp/) or %r(regexp) instead. Ordinary
a / b and a/b division work. See docs/SYNTAX.md for the exact contract.
Constants
OPEN_TO_CLOSE = {'(' => ')', '[' => ']', '{' => '}'}
OPERAND_KEYWORDS = ["if", "unless", "when", "in", "return", "yield", "then", "else", "elsif", "rescue", "ensure", "case", "while", "until", "and", "or", "not", "do"] of ::String
Constructors
Class methods
Instance methods
current
Sourceeof?
Sourceindex
Sourcelocation
Sourceread_until(stops : String = "", whitespace : Bool = false, stop_at_comment : Bool = false, template_strings : Bool = false) : AST::Expression
Sourceremaining
Sourceskip_space
Sourceskip_space_and_comments
Sourcetake
Source