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 "time"
require "readline" require "readline"
require "./types"
require "./expr"
require "./error" require "./error"
require "./printer" require "./printer"
require "./reader" require "./reader"

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

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

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

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

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

@ -40,14 +40,14 @@ module Crisp
class Expr class Expr
alias Func = (Array(Expr) -> 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 is_macro :: Bool
meta :: Expr meta :: Expr
property :is_macro, :meta property :is_macro, :meta
def initialize(@val : ValueExpr)
def initialize(@val : Type)
@is_macro = false @is_macro = false
@meta = nil @meta = nil
end end

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

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

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

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

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

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

Loading…
Cancel
Save