class DDQL::TokenType::SubQuery
Public Class Methods
new()
click to toggle source
Calls superclass method
DDQL::TokenType::new
# File lib/ddql/token_type.rb, line 439 def initialize super(name: :lbrace, pattern: /\{/) end
Public Instance Methods
expression?()
click to toggle source
# File lib/ddql/token_type.rb, line 443 def expression? true end
parse(parser, _token, expression: nil)
click to toggle source
# File lib/ddql/token_type.rb, line 447 def parse(parser, _token, expression: nil) new_expression = parser.parse if parser.peek&.supports_post_processing? _token, new_expression = parser.peek.post_process(parser: parser, expression: new_expression) end if expression.nil? next_token = parser.peek if next_token && (next_token.and? || next_token.or?) { lstatement: new_expression, } else new_expression end else expression.merge(new_expression) end end