File tree Expand file tree Collapse file tree 4 files changed +1
-110
lines changed Expand file tree Collapse file tree 4 files changed +1
-110
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ use std::collections::HashSet;
21
21
pub mod types;
22
22
use types:: Type ;
23
23
24
- /// Table that contains all symbol and its types
25
- pub type SymbolTable = HashMap < String , Option < Type > > ;
26
-
27
24
#[ derive( Debug , Clone ) ]
28
25
pub struct Module {
29
26
pub path : String ,
@@ -39,16 +36,6 @@ impl Module {
39
36
self . structs . append ( & mut other. structs ) ;
40
37
self . globals . append ( & mut other. globals )
41
38
}
42
-
43
- pub fn get_symbol_table ( & self ) -> SymbolTable {
44
- let mut table = SymbolTable :: new ( ) ;
45
-
46
- for func in self . func . clone ( ) {
47
- table. insert ( func. name , func. ret_type ) ;
48
- }
49
-
50
- table
51
- }
52
39
}
53
40
54
41
#[ derive( Debug , Clone ) ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
- mod infer;
17
16
// TODO: Resolve this lint by renaming the module
18
17
#[ allow( clippy:: module_inception) ]
19
18
mod parser;
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ use crate::ast::*;
17
17
use crate :: lexer:: Keyword ;
18
18
use crate :: lexer:: Position ;
19
19
use crate :: lexer:: { Token , TokenKind } ;
20
- use crate :: parser:: infer:: infer;
21
20
use crate :: util:: string_util:: highlight_position_in_file;
22
21
use std:: convert:: TryFrom ;
23
22
use std:: iter:: Peekable ;
@@ -50,11 +49,7 @@ impl Parser {
50
49
}
51
50
52
51
pub fn parse ( & mut self ) -> Result < Module , String > {
53
- let mut program = self . parse_module ( ) ?;
54
- // infer types
55
- infer ( & mut program) ;
56
-
57
- Ok ( program)
52
+ self . parse_module ( )
58
53
}
59
54
60
55
pub ( super ) fn next ( & mut self ) -> Result < Token , String > {
You can’t perform that action at this time.
0 commit comments