File tree Expand file tree Collapse file tree 7 files changed +18
-27
lines changed
Expand file tree Collapse file tree 7 files changed +18
-27
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ open Core.Std
22open Bash_ast
33
44module BAST = Batsh_ast
5- module Symbol_table = Parser. Symbol_table
65
76let is_arith (expr : BAST.expression ) :bool =
87 match expr with
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ let ast =
9595 let ast_sexp = Batsh_ast. sexp_of_t ast in
9696 printf " %a\n " Sexp. output_hum ast_sexp
9797 else
98- let symtable_sexp = Parser. Symbol_table. sexp_of_t (Parser. symtable batsh) in
98+ let symtable_sexp = Symbol_table. sexp_of_t (Parser. symtable batsh) in
9999 printf " %a\n " Sexp. output_hum symtable_sexp
100100 )
101101
Original file line number Diff line number Diff line change @@ -26,10 +26,6 @@ let parse (lexbuf : Lexing.lexbuf) : Batsh_ast.t =
2626 let err = sprintf " %a: syntax error" print_position () in
2727 raise (ParseError err)
2828
29- module Symbol_table = struct
30- include Symbol_table
31- end
32-
3329let create_from_lexbuf (lexbuf : Lexing.lexbuf ) (filename : string ) : t =
3430 lexbuf.Lexing. lex_curr_p < - {
3531 lexbuf.Lexing. lex_curr_p with Lexing. pos_fname = filename
Original file line number Diff line number Diff line change 1- open Core.Std
2-
31type t
42exception ParseError of string
53
6- module Symbol_table : sig
7- type t
8- module Scope : sig
9- type t
10- val is_function : t -> bool
11- val is_global_variable : t -> name : string -> bool
12- val add_temporary_variable : t -> Batsh_ast .identifier
13- val fold : t -> init : 'a -> f : (string -> bool -> 'a -> 'a ) -> 'a
14- end
15- val scope : t -> string -> Scope .t
16- val global_scope : t -> Scope .t
17- val sexp_of_t : t -> Sexp .t
18- val is_function : t -> string -> bool
19- end
20-
214val create_from_file : string -> t
225val create_from_channel : in_channel -> string -> t
236val create_from_string : string -> t
Original file line number Diff line number Diff line change 1+ open Core.Std
2+
3+ type t
4+
5+ module Scope : sig
6+ type t
7+ val is_function : t -> bool
8+ val is_global_variable : t -> name : string -> bool
9+ val add_temporary_variable : t -> Batsh_ast .identifier
10+ val fold : t -> init : 'a -> f : (string -> bool -> 'a -> 'a ) -> 'a
11+ end
12+
13+ val create : Batsh_ast .t -> t
14+ val scope : t -> string -> Scope .t
15+ val global_scope : t -> Scope .t
16+ val sexp_of_t : t -> Sexp .t
17+ val is_function : t -> string -> bool
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ open Core.Std
22open Batsh_ast
33open Winbat_ast
44
5- module Symbol_table = Parser. Symbol_table
6-
75let rec compile_leftvalue
86 (lvalue : Batsh_ast.leftvalue )
97 ~(symtable : Symbol_table.t )
Original file line number Diff line number Diff line change 11open Core.Std
22open Batsh_ast
33
4- module Symbol_table = Parser. Symbol_table
5-
64let rec split_expression
75 ?(no_split_top = false )
86 ?(split_call = true )
You can’t perform that action at this time.
0 commit comments