Skip to content

Commit

Permalink
Deploying to gh-pages from @ 8486a1c 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind committed Feb 3, 2024
1 parent 4e243f3 commit 9d5ed45
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ <h2 id="examples">9. Examples</h2>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-02-02 23:56:08 UTC
Last updated 2024-02-03 07:31:56 UTC
</div>
</div>
</body>
Expand Down
25 changes: 18 additions & 7 deletions reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -641,20 +641,23 @@ <h3 id="formal-grammar">2.5. Formal grammar</h3>
block_params = { "&lt;" ~ block_params_list ~ "&gt;" }
block_params_list = _{
vararg_param_decl
| param_decl ~ block_params_list?
| param_decl ~ ("," ~ block_params_list)?
}

param_decl = { symbol }
vararg_param_decl = { "..." ~ symbol }

// A subroutine is just a block with an explicit name.
subroutine = { "sub" ~ symbol ~ block }

// Blocks and programs are lists of statements.
statement_list = { statement_separator* ~ (statement ~ (statement_separator+ ~ statement)*)? ~ statement_separator* }
statement_separator = _{ NEWLINE | ";" }

// A statement can be either an assignment or a pipeline.
statement = _{ import_statement | assignment_statement | pipeline_statement }
statement = _{ import_statement | assignment_statement | return_statement | pipeline_statement }

import_statement = { "import" ~ string_literal ~ "for" ~ import_clause }
import_statement = { KEYWORD_IMPORT ~ string_literal ~ "for" ~ import_clause }
import_clause = { import_wildcard | import_items }
import_items = { string_literal+ }
import_wildcard = { "*" }
Expand All @@ -667,6 +670,8 @@ <h3 id="formal-grammar">2.5. Formal grammar</h3>
| &amp;"$" ~ variable_substitution
}

return_statement = { KEYWORD_RETURN ~ expr? }

pipeline_statement = { pipeline }

// Expression is the main syntax building block.
Expand All @@ -676,6 +681,7 @@ <h3 id="formal-grammar">2.5. Formal grammar</h3>
}
unary_expr = _{
block
| subroutine
| "(" ~ pipeline ~ ")"
| cvar_scope
| cvar
Expand Down Expand Up @@ -712,7 +718,7 @@ <h3 id="formal-grammar">2.5. Formal grammar</h3>
cvar = ${ "@" ~ string_literal }

// Binds a context variable to a value for the duration of a scope.
cvar_scope = { "let" ~ cvar ~ "=" ~ expr ~ block }
cvar_scope = { KEYWORD_LET ~ cvar ~ "=" ~ expr ~ block }

// Dollar sign indicates the start of some form of substitution.
substitution = ${ &amp;"$" ~ (
Expand Down Expand Up @@ -756,7 +762,7 @@ <h3 id="formal-grammar">2.5. Formal grammar</h3>

// A list of keywords that are not allowed as bare identifiers because they have
// special meaning.
reserved_words = _{ "import" | "let" }
reserved_words = _{ KEYWORD_IMPORT | KEYWORD_LET | KEYWORD_RETURN }

// Operator to access namespaces and table members.
member_operator = _{ "-&gt;" }
Expand All @@ -770,7 +776,12 @@ <h3 id="formal-grammar">2.5. Formal grammar</h3>

// Only horizontal whitespace is insignificant; vertical whitespace is used to
// separate staements in blocks.
WHITESPACE = _{ " " | "\t" | "\\" ~ NEWLINE }</code></pre>
WHITESPACE = _{ " " | "\t" | "\\" ~ NEWLINE }

// All reserved keywords.
KEYWORD_IMPORT = _{ "import" }
KEYWORD_LET = _{ "let" }
KEYWORD_RETURN = _{ "return" }</code></pre>
</div>
</div>
<div class="paragraph">
Expand Down Expand Up @@ -1501,7 +1512,7 @@ <h2 id="influences">Appendix B: Influences</h2>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-02-02 23:56:08 UTC
Last updated 2024-02-03 07:31:56 UTC
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css">
Expand Down
2 changes: 1 addition & 1 deletion ripshell.html
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ <h2 id="goals">Appendix A: Goals</h2>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-02-02 23:56:08 UTC
Last updated 2024-02-03 07:31:56 UTC
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css">
Expand Down

0 comments on commit 9d5ed45

Please sign in to comment.