diff --git a/cherry-lisp.cabal b/cherry-lisp.cabal index ed13953..0c23f66 100644 --- a/cherry-lisp.cabal +++ b/cherry-lisp.cabal @@ -19,12 +19,11 @@ executable cherry default-language: Haskell2010 other-modules: ExprType, - ExprParser, + Parser, TokenType, - TokenParser, + Lexer, Evaluator, - ParserUtils, - TokenParser + ParserUtils build-depends: base >= 4.7 && < 5, containers, diff --git a/src/Evaluator.hs b/src/Evaluator.hs index d6baaa0..8eb7ab7 100644 --- a/src/Evaluator.hs +++ b/src/Evaluator.hs @@ -4,11 +4,9 @@ import qualified Data.Map as M import ExprType type Env = M.Map String Expr -type Proc = String -- TODO: create a separated file for builtinProcs -- TODO: create a BuiltinProc or something like that in data Expr, and make + a builtin proc --- TODO: create enviroments base :: Env base = M.fromList [ diff --git a/src/TokenParser.hs b/src/Lexer.hs similarity index 97% rename from src/TokenParser.hs rename to src/Lexer.hs index 8d31055..cd5bc42 100644 --- a/src/TokenParser.hs +++ b/src/Lexer.hs @@ -1,4 +1,4 @@ -module TokenParser where +module Lexer where import Text.ParserCombinators.Parsec import ParserUtils diff --git a/src/Main.hs b/src/Main.hs index fa79d53..7b77854 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,7 +1,7 @@ module Main where import Evaluator -import ExprParser +import Parser import Control.Monad import Data.Maybe import System.Console.Haskeline diff --git a/src/ExprParser.hs b/src/Parser.hs similarity index 97% rename from src/ExprParser.hs rename to src/Parser.hs index 36cc1b0..3970ee4 100644 --- a/src/ExprParser.hs +++ b/src/Parser.hs @@ -1,8 +1,8 @@ -module ExprParser where +module Parser where import Text.Parsec import Text.Parsec.String -import TokenParser +import Lexer import TokenType import ExprType