Support \arraystretch as a macro definition (#1381)

* Support \arraystretch as a macro definition

Also add `expandMacro` and `expandMacroAsText` helpers to `MacroExpander`.

* Remove excess defaulting

* Add test
This commit is contained in:
Erik Demaine
2018-06-03 18:19:23 -04:00
committed by Kevin Barabash
parent 563b0d5f8f
commit fcb32f058b
5 changed files with 212 additions and 6 deletions

View File

@@ -38,6 +38,18 @@ export interface MacroContextInterface {
*/
expandAfterFuture(): Token;
/**
* Fully expand the given macro name and return the resulting list of
* tokens, or return `undefined` if no such macro is defined.
*/
expandMacro(name: string): Token[] | void;
/**
* Fully expand the given macro name and return the result as a string,
* or return `undefined` if no such macro is defined.
*/
expandMacroAsText(name: string): string | void;
/**
* Consume the specified number of arguments from the token stream,
* and return the resulting array of arguments.