Module: Parser
- Defined in:
- lib/parser/parser.rb,
lib/parser/comment.rb,
lib/parser/exceptions.rb,
lib/parser/comment_parser.rb,
lib/parser/meta_container.rb
Overview
Defined Under Namespace
Modules: MetaContainer Classes: Comment, CommentParser, NotValidTokenline, Parser, Tokenline
Constant Summary collapse
- NO_BR =
/((?!\n)\s)/
- ALL =
/./m
- M_START =
Multiline Comments
/\/\*+/
- M_END =
End of multiline comment with all leading whitespaces (no breaks)
/#{NO_BR}*\*+\//
- S_START =
Singleline Comments
/\/\//
- S_END =
/\n/
- LINE_START =
/(#{NO_BR})*\*+#{NO_BR}?/
- LINE_END =
/\n/
- EMPTY_LINE =
/^\s*$/
- TOKENLINE_START =
CAUTION: s can contain breaks ānā
/\s*@/
- TOKENLINE =
/ #{TOKENLINE_START} (?<name>\w+) (?:#{NO_BR}?(?<content>#{ALL}+)|$) /x
- S_STRING =
String delimiter
/'/
- D_STRING =
/"/
- REGEXP_START =
/\/[^\/]/
- REGEXP_END =
/\//
- NON_COMMENT_PATTERNS =
{ S_STRING => S_STRING, D_STRING => D_STRING, REGEXP_START => REGEXP_END }
- NON_CODE_PATTERNS =
{ M_START => M_END, S_START => S_END, S_STRING => S_STRING, D_STRING => D_STRING, REGEXP_START => REGEXP_END }