Module: Haml::Precompiler

Included in:
Engine
Defined in:
lib/gems/haml-2.0.4/lib/haml/precompiler.rb

Defined Under Namespace

Classes: Line

Constant Summary collapse

ELEMENT =

Designates an XHTML/XML element.

?%
DIV_CLASS =

Designates a <div> element with the given class.

?.
DIV_ID =

Designates a <div> element with the given id.

?#
COMMENT =

Designates an XHTML/XML comment.

?/
DOCTYPE =

Designates an XHTML doctype or script that is never HTML-escaped.

?!
SCRIPT =

Designates script, the result of which is output.

?=
SANITIZE =

Designates script that is always HTML-escaped.

?&
FLAT_SCRIPT =

Designates script, the result of which is flattened and output.

?~
SILENT_SCRIPT =

Designates script which is run but not output.

?-
SILENT_COMMENT =

When following SILENT_SCRIPT, designates a comment that is not output.

?#
ESCAPE =

Designates a non-parsed line.

?\\
FILTER =

Designates a block of filtered text.

?:
PLAIN_TEXT =

Designates a non-parsed line. Not actually a character.

-1
SPECIAL_CHARACTERS =

Keeps track of the ASCII values of the characters that begin a specially-interpreted line.

[
  ELEMENT,
  DIV_CLASS,
  DIV_ID,
  COMMENT,
  DOCTYPE,
  SCRIPT,
  SANITIZE,
  FLAT_SCRIPT,
  SILENT_SCRIPT,
  ESCAPE,
  FILTER
]
MULTILINE_CHAR_VALUE =

The value of the character that designates that a line is part of a multiline string.

?|
MULTILINE_STARTERS =

Characters that designate that a multiline string may be about to begin.

SPECIAL_CHARACTERS - [?/]
MID_BLOCK_KEYWORDS =

Keywords that appear in the middle of a Ruby block with lowered indentation. If a block has been started using indentation, lowering the indentation with one of these won’t end the block. For example:

- if foo
  %p yes!
- else
  %p no!

The block is ended after %p no!, because else is a member of this array.

['else', 'elsif', 'rescue', 'ensure', 'when']
DOCTYPE_REGEX =

The Regex that matches a Doctype command.

/(\d\.\d)?[\s]*([a-z]*)/i
LITERAL_VALUE_REGEX =

The Regex that matches a literal string or symbol value

/^\s*(:(\w*)|(('|")([^\\\#'"]*?)\4))\s*$/