Sha256: bb9f33617847bb095bad9636214a94e7991ac8ac7c4f7ac44e85e3d63e8c3ff8
Contents?: true
Size: 847 Bytes
Versions: 17
Compression:
Stored size: 847 Bytes
Contents
# @Opulent module Opulent # @Parser class Parser # Check if we match a new node definition to use within our page. # # Definitions will not be recursive because, by the time we parse # the definition children, the definition itself is not in the # knowledgebase yet. # # However, we may use previously defined nodes inside new definitions, # due to the fact that they are known at parse time. # # @param nodes [Array] Parent node to which we append to # def define(parent, indent) if(match = accept :def) # Process data name = accept(:node, :*).to_sym # Create node definition = [:def, name, {parameters: attributes}, [], indent] root(definition, indent) # Add to parent @definitions[name] = definition end end end end
Version data entries
17 entries across 17 versions & 1 rubygems