Class: Stone::AST::NullLiteral
- Inherits:
-
Expression
- Object
- Stone::AST
- Expression
- Stone::AST::NullLiteral
- Defined in:
- lib/stone/ast/null_literal.rb
Instance Attribute Summary
Attributes inherited from Stone::AST
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ NullLiteral
constructor
A new instance of NullLiteral.
- #to_llir(_builder, _mod, _scope = Stone::Scope.top_level) ⇒ Object
- #to_s ⇒ Object
- #type(_context = nil) ⇒ Object
Constructor Details
#initialize ⇒ NullLiteral
11 12 13 |
# File 'lib/stone/ast/null_literal.rb', line 11 def initialize @name = :null_literal end |
Class Method Details
.parse(_text, _location) ⇒ Object
7 8 9 |
# File 'lib/stone/ast/null_literal.rb', line 7 def self.parse(_text, _location) new end |
Instance Method Details
#to_llir(_builder, _mod, _scope = Stone::Scope.top_level) ⇒ Object
15 16 17 |
# File 'lib/stone/ast/null_literal.rb', line 15 def to_llir(_builder, _mod, _scope = Stone::Scope.top_level) LLVM::Type.ptr.null end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/stone/ast/null_literal.rb', line 19 def to_s "NULL" end |
#type(_context = nil) ⇒ Object
23 24 25 |
# File 'lib/stone/ast/null_literal.rb', line 23 def type(_context = nil) Stone::Type::Null end |