You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ npm install
52
52
53
53
### Code Overview
54
54
55
-
```/transpiler``` contains the two main components of the transpiler:
55
+
```/transpiler``` contains the two main components of the transpiler and the API:
56
56
57
57
- Lexer: Generates a stream of tokens representing the lexical parts of the Swift input. The lexer uses a state object to store the token stream and other relevant information related to the Swift input. It is organized into three main files:
58
58
-```lexer.js``` iterates over the Swift code, separating it into individual parts to be evaluated based on their precedence in Swift.
@@ -64,7 +64,10 @@ npm install
64
64
-```parser.js``` is where the different modules come together to build the final tree output.
65
65
-```rearrange``` are a group of functions that take the original tokens from the lexer and rearrange them in a manner that is conducive to building the AST so that it produces the equivalent JavaScript output of the Swift input.
66
66
67
-
Note about the CLI
67
+
- API: Provides an interface for the CLI and transpiler web app to interact with the core transpiler.
68
+
69
+
```command.js``` contains the code for the command line interface
70
+
- The CLI uses Commander.js for handling a variety of user inputs, and uses Bluebird for promises.
0 commit comments