# Author:: Eric Crane (mailto:eric.crane@mac.com) # Copyright:: Copyright (c) 2019 Eric Crane. All rights reserved. # # An Expression that can be evaluated. # module GlooLang module Expr class LBoolean < GlooLang::Core::Literal # # Is the given token a boolean? # def self.boolean?( token ) return GlooLang::Objs::Boolean.boolean? token end # # Set the value, converting to an boolean. # def set_value( value ) @value = GlooLang::Objs::Boolean.coerse_to_bool value end # # Get string representation # def to_s return 'false' unless @value return @value.to_s end end end end