Sfoglia il codice sorgente

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 anni fa
parent
commit
f5dc374ef8
7 ha cambiato i file con 8 aggiunte e 8 eliminazioni
  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 Vedi 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 Vedi File

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

+ 1
- 1
src/crisp/evaluator.cr Vedi 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 Vedi 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 Vedi 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 Vedi File

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

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

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

Caricamento…
Annulla
Salva