-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include ADK_Error, ErrorHandler from Errors | ||
include Lexer from Lexer | ||
include Parser from "new-Parser" | ||
include Optimizer | ||
|
||
function run_file(filename) { | ||
let code = open(filename).read() | ||
let error_handler = ErrorHandler(code, filename) | ||
let lexer = Lexer(false, false, error_handler) | ||
let tokens = lexer.tokenize(code) | ||
let parser = Parser(lexer, error_handler) | ||
let AST = parser.parse() | ||
# TODO: Cache the AST and tokens | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
let json = python.import("json") | ||
|
||
let loads = json.loads | ||
|
||
let dumps = json.dumps | ||
|
||
let dump = json.dump | ||
|
||
let decoder = json.decoder | ||
|
||
let JSONEncoder = json.JSONEncoder | ||
|
||
let JSONDecoder = json.JSONDecoder | ||
|
||
let JSONDecodeError = json.JSONDecodeError | ||
|
||
let detect_encoding = json.detect_encoding | ||
|
||
let scanner = json.scanner | ||
|
||
let tool = json.tool |