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

docs: Update docs for whitespace and inverted types #31

Merged
merged 1 commit into from
Oct 27, 2022
Merged

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Oct 11, 2022

Update docs for whitespace. While at it, remove a bunch of duplicated
sections in grammar. We are now making horizontal whitespace WS
significant in certain places which allows us to remove the somewhat
awkward array and map typing in favour of derived and inferred types
for literals.

Remove term from grammar as it is not used in code, we only work with
expression. Introduce <- -> and <+ +> tokens to annotated
whitespace inside grammar: expressions in expression lists, such as
function calls or array elements may not contain whitespace, as
whitespace is used as list separator.

Invert types so that types read as variables are being access:

    m:[]{}string
    m[0].name = "Joe"

Also add note on pass by reference for maps and arrays and pass by value
for string, num and bool.


For easier review:
https://github.com/foxygoat/evy/blob/docs-ws/docs/syntax_by_example.md
https://github.com/foxygoat/evy/blob/docs-ws/docs/syntax_grammar.md

@github-actions
Copy link

github-actions bot commented Oct 11, 2022

firebase-deployment: https://evy-lang--31-ktgfx6tx.web.app (97fa08b)

@juliaogris juliaogris force-pushed the docs-ws branch 6 times, most recently from 78b5e9b to 29d621b Compare October 14, 2022 14:20
@juliaogris juliaogris changed the title docs: Update docs for whitespace docs: Update docs for whitespace and inverted types Oct 14, 2022
@juliaogris juliaogris force-pushed the docs-ws branch 7 times, most recently from fa5dbb4 to 77d30cb Compare October 17, 2022 04:06
Update docs for whitespace. While at it, remove a bunch of duplicated
sections in grammar. We are now making horizontal whitespace `WS`
significant in certain places which allows us to remove the somewhat
awkward array and map typing in favour of derived and inferred types
for literals.

Remove `term` from grammar as it is not used in code, we only work with
expression. Introduce `<- ->` and  `<+ +>` tokens to annotated
whitespace inside grammar: expressions in expression lists, such as
function calls or array elements may not contain whitespace, as
whitespace is used as list separator.

Invert types so that types read as variables are being access:

	m:[]{}string
	m[0].name = "Joe"

Also add note on pass by reference for maps and arrays and pass by value
for string, num and bool.
Copy link
Contributor

@camh- camh- left a comment

Choose a reason for hiding this comment

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

🪴

@juliaogris juliaogris merged commit cb3f4e2 into master Oct 27, 2022
@juliaogris juliaogris deleted the docs-ws branch October 27, 2022 04:48
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

2 participants