Browse Source

rename types.cr to expr.cr

I did not separate types.cr to type.cr and expr.cr because function type
requires the definition of Crisp::Expr.  They depend on each
definitions.
master
rhysd 9 years ago
parent
commit
f5dc374ef8
7 changed files with 8 additions and 8 deletions
  1. +1
    -1
      src/crisp/core.cr
  2. +1
    -1
      src/crisp/env.cr
  3. +1
    -1
      src/crisp/evaluator.cr
  4. +2
    -2
      src/crisp/expr.cr
  5. +1
    -1
      src/crisp/interpreter.cr
  6. +1
    -1
      src/crisp/printer.cr
  7. +1
    -1
      src/crisp/reader.cr

+ 1
- 1
src/crisp/core.cr View File

@ -1,7 +1,7 @@
require "time"
require "readline"
require "./types"
require "./expr"
require "./error"
require "./printer"
require "./reader"

+ 1
- 1
src/crisp/env.cr View File

@ -1,4 +1,4 @@
require "./types"
require "./expr"
require "./error"
module Crisp

+ 1
- 1
src/crisp/evaluator.cr View File

@ -3,7 +3,7 @@ require "readline"
require "./reader"
require "./printer"
require "./types"
require "./expr"
require "./env"
require "./core"
require "./error"

src/crisp/types.cr → src/crisp/expr.cr View File

@ -40,14 +40,14 @@ module Crisp
class Expr
alias Func = (Array(Expr) -> Expr)
alias ValueExpr = Nil | Bool | Int32 | String | Symbol | List | Vector | HashMap | Func | Closure | Atom
alias Type = Nil | Bool | Int32 | String | Symbol | List | Vector | HashMap | Func | Closure | Atom
is_macro :: Bool
meta :: Expr
property :is_macro, :meta
def initialize(@val : ValueExpr)
def initialize(@val : Type)
@is_macro = false
@meta = nil
end

+ 1
- 1
src/crisp/interpreter.cr View File

@ -3,7 +3,7 @@ require "readline"
require "./reader"
require "./printer"
require "./types"
require "./expr"
require "./env"
require "./core"
require "./error"

+ 1
- 1
src/crisp/printer.cr View File

@ -1,4 +1,4 @@
require "./types"
require "./expr"
module Crisp
class Printer

+ 1
- 1
src/crisp/reader.cr View File

@ -1,4 +1,4 @@
require "./types"
require "./expr"
require "./error"
module Crisp

Loading…
Cancel
Save