Sha256: 01e3618e2d933eca2ad3bf8b72b089b4d34a22218a573c3379fc3f2d35ce7bab
Contents?: true
Size: 753 Bytes
Versions: 7
Compression:
Stored size: 753 Bytes
Contents
# @Opulent module Opulent # @Parser class Parser # Match one line or multiline comments # def comment(parent, indent) if (accept :comment) multiline = true if (accept :comment) buffer = accept(:line_feed) buffer += accept(:newline) || "" buffer += get_indented_lines indent if multiline # If we have a comment which is visible in the output, we will # create a new comment element. Otherwise, we ignore the current # gathered text and we simply begin the root parsing again if buffer[0] == '!' parent[@children] << [:comment, buffer[1..-1].strip, {}, nil, indent] end return parent end end end end
Version data entries
7 entries across 7 versions & 1 rubygems