Class: Idl::FalseExpressionAst
- Inherits:
-
AstNode
- Object
- AstNode
- Idl::FalseExpressionAst
show all
- Includes:
- Rvalue
- Defined in:
- lib/idlc/ast.rb,
lib/idlc/passes/gen_adoc.rb,
lib/idlc/passes/gen_option_adoc.rb
Constant Summary
Constants inherited
from AstNode
AstNode::Bits1Type, AstNode::Bits32Type, AstNode::Bits64Type, AstNode::BoolType, AstNode::ConstBoolType, AstNode::PossiblyUnknownBits1Type, AstNode::PossiblyUnknownBits32Type, AstNode::PossiblyUnknownBits64Type, AstNode::ReachableFunctionCacheType, AstNode::StringType, AstNode::VoidType
Instance Attribute Summary
Attributes inherited from AstNode
#children, #input, #interval, #parent
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Rvalue
#max_value, #min_value, #truncate, #values
Methods inherited from AstNode
#always_terminates?, #declaration?, #executable?, extract_base_var_name, #find_ancestor, #find_dst_registers, #find_referenced_csrs, #find_src_registers, #freeze_tree, #input_file, input_from_source_yaml, #inspect, #internal_error, interval_from_source_yaml, #lineno, #lines_around, #nullify_assignments, #pass_find_return_values, #path, #print_ast, #prune, #reachable_exceptions, #reachable_functions, #set_input_file, #set_input_file_unless_already_set, #source_line_file_offsets, #source_starting_offset, #source_yaml, #starting_line, #text_value, #truncation_warn, #type_error, #unindent, value_else, #value_else, value_error, #value_error, value_try, #value_try, write_back_nested
Constructor Details
Returns a new instance of FalseExpressionAst.
1032
1033
1034
|
# File 'lib/idlc/ast.rb', line 1032
def initialize(input, interval)
super(input, interval, [])
end
|
Class Method Details
.from_h(yaml, source_mapper) ⇒ Object
1058
1059
1060
1061
1062
1063
1064
1065
1066
|
# File 'lib/idlc/ast.rb', line 1058
def self.from_h(yaml, source_mapper)
input = input_from_source_yaml(yaml.fetch("source"), source_mapper)
interval = interval_from_source_yaml(yaml.fetch("source"))
if input.nil?
FalseExpressionAst.new("false", 0..4)
else
FalseExpressionAst.new(input, T.must(interval))
end
end
|
Instance Method Details
#const_eval?(symtab) ⇒ Boolean
1037
|
# File 'lib/idlc/ast.rb', line 1037
def const_eval?(symtab) = true
|
#gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object
158
159
160
|
# File 'lib/idlc/passes/gen_adoc.rb', line 158
def gen_adoc(indent = 0, indent_spaces: 2)
"#{' ' * indent}false"
end
|
#gen_option_adoc ⇒ Object
93
|
# File 'lib/idlc/passes/gen_option_adoc.rb', line 93
def gen_option_adoc = "false"
|
#to_h ⇒ Object
1052
1053
1054
1055
|
# File 'lib/idlc/ast.rb', line 1052
def to_h = {
"kind" => "false",
"source" => source_yaml
}
|
#to_idl ⇒ Object
1049
|
# File 'lib/idlc/ast.rb', line 1049
def to_idl = "false"
|
#type(symtab) ⇒ Object
1043
|
# File 'lib/idlc/ast.rb', line 1043
def type(symtab) = BoolType
|
#type_check(symtab, strict:) ⇒ Object
1040
|
# File 'lib/idlc/ast.rb', line 1040
def type_check(symtab, strict:); end
|
#value(symtab) ⇒ Object
1046
|
# File 'lib/idlc/ast.rb', line 1046
def value(symtab) = false
|