Method: Glyph::Interpreter#parse

Defined in:
lib/glyph/interpreter.rb

#parseGlyph::SyntaxNode

Parses the string provided during initialization

Returns:

Since:

  • 0.3.0


45
46
47
48
49
50
51
# File 'lib/glyph/interpreter.rb', line 45

def parse
	Glyph.info "Parsing: #{@context[:source][:name]}" if Glyph.debug? && @context[:info] && @context[:source][:name]
	@tree = @parser.parse
	@document = Glyph::Document.new @tree, @context
	@document.inherit_from @context[:document] if @context[:document]
	@tree
end