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

Porting the Style compiler to the web #413

Closed
wants to merge 8 commits into from
Closed

Conversation

wodeni
Copy link
Member

@wodeni wodeni commented Dec 2, 2020

Description

Related issues: #336

We will port the Style parser and compiler into TypeScript.

Implementation strategy and design decisions

TODO

Examples with steps to reproduce them

TODO

Checklist

TODO: update checklist for TS

  • I have commented my code, particularly in hard-to-understand areas
  • I ran Haddock and there were no errors when generating the HTML site
  • My changes generate no new warnings
  • New and existing tests pass locally using stack test
  • My code follows the style guidelines of this project (e.g.: no HLint warnings)

Open questions

Questions that require more discussion or to be addressed in future development:

@wodeni wodeni changed the base branch from master to shapedefs December 2, 2020 02:00
@wodeni
Copy link
Member Author

wodeni commented Dec 2, 2020

AST types are converted to TS. See penrose-web/src/compiler/Style.ts for a possible place to put the Style compiler code: @hypotext. The top-level function should be compileStyle, and its signature looks like something like this:

export const compileStyle = (styAST: StyProg, subout: SubOut): Stete => {
  // TODO: fill in the style compiler here
}

@wodeni
Copy link
Member Author

wodeni commented Dec 2, 2020

All types for SubOut (including VarEnv etc) are converted to TS as well. Note that these types will need some tweaking due to naming/structural issues, but they should be good enough as a starting point for writing the Style compiler (@hypotext ). I'd suggest we leave them for now and wait until the Domain/Substance port.

@wodeni wodeni changed the base branch from shapedefs to master December 3, 2020 19:26
@wodeni
Copy link
Member Author

wodeni commented Dec 3, 2020

Since the histories of this branch and master have diverged, #419 is currently tracking this feature instead.

@wodeni wodeni closed this Dec 3, 2020
@kai-qu kai-qu deleted the sty-parse-compile branch February 26, 2021 00:42
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.

None yet

1 participant