Move \global and \def to functions (#2138)

* Add parseNode type `internal`

* Move \def and \newcommand to functions

* Fix Flow error

* Separate \global

Move \newcommand back to macros for now

* Rename assignment.js to def.js

* Update test cases

* Add comments

* Update a test case
This commit is contained in:
ylemkimon
2019-12-05 10:07:20 +09:00
committed by Kevin Barabash
parent 0d8830af30
commit b1eeeecf91
8 changed files with 104 additions and 57 deletions

View File

@@ -51,6 +51,11 @@ spread out over three different files [functions.js](src/functions.js),
[buildHTML.js](src/buildHTML.js), [buildMathML.js](src/buildMathML.js) into a
single file. The goal is to have all functions use this new system.
#### Macros
Macros should be added in [src/macros.js](src/macros.js) using `defineMacro`.
They are expanded in the "gullet" (`MacroExpander`).
## Testing
Local testing can be done by running the webpack-dev-server using configuration