Replies: 7 comments 5 replies
-
Interesting idea. This could certainly be useful. Maybe instead of throwing an error when a bracket misses or the right hand side of an operator misses, the parser should add the error message to a separate error list (message and character index), and continue as good as possible. It may not be that hard to implement actually. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Yes, and operators need to support a missing right hand side. |
Beta Was this translation helpful? Give feedback.
-
+1 This functionality would be GREAT when coupling with Tex for user input |
Beta Was this translation helpful? Give feedback.
-
See also the ideas in #2289. |
Beta Was this translation helpful? Give feedback.
-
The various concepts floated here and in #2289 sound a fair amount like the things that the Language Server Protocol provides; possibly creating a Language Server for the mathjs-expression-language (which I think still needs a name) is really the direction to think about in this era? |
Beta Was this translation helpful? Give feedback.
-
While doing some experiments defining mathjs mode for a text editor, this project was encountered for parsing text https://lezer.codemirror.net/ It seems that some of its features could be useful for the mathjs parser. |
Beta Was this translation helpful? Give feedback.
-
It would be useful to have the parser return parse trees for incomplete/invalid inputs like
(1+1
.This isn't desirable as a default behaviour but as an optional behaviour that can be turned on and of.
Use case: Showing live previews of formulas and calculations from user input.
Is it possible to implement without having to rewrite the entire parser? And if so, is it a feature that fits in the scope of mathjs?
Beta Was this translation helpful? Give feedback.
All reactions