Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAST and XML Compatability #24

Merged
merged 65 commits into from
Oct 22, 2023
Merged

DAST and XML Compatability #24

merged 65 commits into from
Oct 22, 2023

Conversation

siefkenj
Copy link
Contributor

@siefkenj siefkenj commented Sep 3, 2023

This PR

  • updates the Lezer grammar to support all XML features, so valid XML documents should parse as DoenetML documents.
  • Introduces DAST (DoenetML Abstract Syntax Tree) as a format for interacting with DoenetML source code. The old parser.ts is still around, but it should be reworked to use DAST.
    • DAST has a type: "error" node that contains information about parse errors.
    • the toXml function can output proper XML or DoenetML-style markup (e.g., with JSX-style properties). It can also output explicit <_error> nodes where errors were encountered, or it can silently omit them.
  • A basic pretty-printer based off of Prettier. Lots more work needs to be done on the pretty printer to make sure it satisfies all the edge cases.
  • Add a showFormatter attribute to CodeEditor that will allow for pretty printing of code and for converting between XML and DoenetML

Copy link
Member

@dqnykamp dqnykamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@dqnykamp dqnykamp merged commit 3616d26 into Doenet:main Oct 22, 2023
1 check passed
dqnykamp pushed a commit to dqnykamp/DoenetML that referenced this pull request Jun 29, 2024
detect if the accessing keyboard caused mathinput blur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants