module Temple::Utils

def empty_exp?(exp)

def empty_exp?(exp)
  case exp[0]
  when :multi
    exp[1..-1].all? { |e| e[0] == :newline }
  else
    false
  end
end

def literal_string?(str)

def literal_string?(str)
  lexer = RubyLex.new
  lexer.set_input(StringIO.new(str.strip))
  
  # The first token has to be a string.
  LITERAL_TOKENS.include?(lexer.token.class) and
  # That has to be the only token.
  lexer.token.nil?
end