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

Draft concatenative language for demo editor #17

Merged
merged 37 commits into from
Jul 21, 2019

Conversation

e-matteson
Copy link
Collaborator

There are also some changes outside of the demo crate, notably:

  • fix panic in Tree::clone()
  • fix panic when accessing text in an Ast
  • implement EditorCmd::Cut and EditorCmd::Copy
  • make json test utils return a Language instead of a LanguageSet
  • manually impl Debug for Ast, so we can derive debug for things that contain it

it was getting too complicated for a single file in the examples directory
More convenient for combining multiple languages into one LanguageSet later.
Nodes with `Arity::Text` are branches that contain 1 child, which is a leaf.
`AstRef::text()` seemed to assume that nodes with `Arity::Text` are leaf nodes,
instead.
Doesn't work yet, because text rendering panics...
At least it doesn't panic anymore...
This reverts commit 814d66ed7dfa3f074e8aa8165d77856210107998.
Not needed, because clone is fixed now.
It should eventually be a Doc, not a string, but Text rendering is broken right
now.
Copy link
Owner

@justinpombrio justinpombrio left a comment

Choose a reason for hiding this comment

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

Yay, copy/paste!

editor/src/ast/ast.rs Show resolved Hide resolved
editor/src/doc.rs Show resolved Hide resolved
editor/src/doc.rs Show resolved Hide resolved
editor/src/doc.rs Outdated Show resolved Hide resolved
forest/src/tree.rs Show resolved Hide resolved
forest/src/tree.rs Outdated Show resolved Hide resolved
forest/src/tree.rs Outdated Show resolved Hide resolved
editor/src/doc.rs Show resolved Hide resolved
forest/src/lib.rs Outdated Show resolved Hide resolved
@justinpombrio justinpombrio merged commit fc24a6a into master Jul 21, 2019
@justinpombrio justinpombrio deleted the demo-ed-concat-lang branch February 23, 2020 21:04
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.

2 participants