~tim/scheme-vm

31efcc2dc0a7ab0e7d8d317159d4fe34cb5d696b — Tim Morgan 4 years ago 85f517e
Fix how identifiers are recognized

This allows = to be an identifier
1 files changed, 3 insertions(+), 3 deletions(-)

M compiler.rb
M compiler.rb => compiler.rb +3 -3
@@ 127,8 127,8 @@ class Compiler

  def compile_literal(literal, options = { use: false, locals: {} })
    case literal.to_s.strip
    when /\A[a-z]|\A#[a-z].*\.v\d+$/
      compile_atom(literal, options)
    when /\A-?[0-9]+\z/
      compile_number(literal, options)
    when '#t', '#true', '#f', '#false'
      compile_boolean(literal, options)
    when /\A#\\(.+)\z/


@@ 138,7 138,7 @@ class Compiler
    when ''
      []
    else
      compile_number(literal, options)
      compile_atom(literal, options)
    end
  end