diff options
| author | Simon-Kor <52245124+Simon-Kor@users.noreply.github.com> | 2024-09-17 00:36:24 +0200 |
|---|---|---|
| committer | Simon-Kor <52245124+Simon-Kor@users.noreply.github.com> | 2024-09-17 00:36:24 +0200 |
| commit | 5362771c14eccd80fd1a3ab6521c3a6ad9bb7838 (patch) | |
| tree | 4b64211436b5c5d7145cd552231591ed1c7e68f3 /source/Syntax/Concrete.hs | |
| parent | 3dca719ba8f9a59471f2c761cf8846cf597eae97 (diff) | |
Corrected Math Env Parsing
Since Latex has a really specify syntax for
\begin{cases} ... \end{cases}
The math mode in tokenizing had to be setup correctly.
Diffstat (limited to 'source/Syntax/Concrete.hs')
| -rw-r--r-- | source/Syntax/Concrete.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/Syntax/Concrete.hs b/source/Syntax/Concrete.hs index 9d52995..7a89bea 100644 --- a/source/Syntax/Concrete.hs +++ b/source/Syntax/Concrete.hs @@ -373,15 +373,15 @@ grammar lexicon@Lexicon{..} = mdo -- 3 & \text{else} -- \end{cases} - functionDefineCase <- rule $ (,) <$> (_ampersand *> expr) <*> (_ampersand *> text _if *> formula) + functionDefineCase <- rule $ (,) <$> (optional _ampersand *> expr) <*> (_ampersand *> text _if *> formula) defineFunctionMathy <- rule $ DefineFunctionMathy <$> (_define *> beginMath *> varSymbol) -- Define $ f <*> (_colon *> varSymbol) -- : 'var' \to 'var' <*> (_to *> expr <* endMath <* _suchThat) -- <*> (_suchThat *> align (many1 ((_ampersand *> varSymbol <* _mapsto) <*> exprApp <*> (_ampersand *> formula)))) -- <*> (_suchThat *> align (many1 (varSymbol <* exprApp <* formula))) - <*> (beginMath *> varSymbol) <*> (paren varSymbol <* _eq <* endMath) - <*> cases (many1 functionDefineCase) + <*> (beginMath *> varSymbol) <*> (paren varSymbol <* _eq ) + <*> cases (many1 functionDefineCase) <* endMath <* optional _dot <*> proof |
