-
Notifications
You must be signed in to change notification settings - Fork 1
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
Component System (version 0.2.0) #116
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
viega
commented
Oct 6, 2023
•
edited
Loading
edited
- Implements the component system now used in Chalk. It allows you to have modules that take parameters, done in a way where it's easy to provide an interface that requires NO code. See : Design Doc for component system chalk#30
- Pulls in new nimutils changes, including the new IO system, the subprocess API, etc.
WIP: Component system Most of the first draft is done. The major exception for the component info is the treecheck code for param blocks. I also have started a bit of the support work that needs to be done, such as removing static lock checks (the dynamic ones need to be redone still).
Compiling but no testing started yet
Removed Stream object in Con4mToken Added a StrCursor object that holds Runes and can be serialized.
Polished, filling in missing pieces, and getting it to work on a test program. The stack interface had to be massaged. All our stuff currently passes streams. And it now can take a URL instead, though I think that probably needs a tweak, as I'm not testing it yet. Should work fine in the 'use' statement though. Also, I reworked some tiny bits in the lexer and parser related to newline handling. - The interface for statements now has some stuff to handle a graceful statement end. - Sections and parameters no longer REQUIRE braces. - The pre-check phase has been combined into the post-check phase. - Any operator tokens will always cause any following whitespace token to gobble up a newline. Meaning, you should *always* be able to add a single newline after any operator (not literal tokens, etc).
This way, they can be used as field names.
I (eventually) realized when `chalk gen` didn't work that there were plenty of cases where we'd be running two execution contexts that might share the same base code, leading to type conflicts across the execution environments. To compensate, I moved the component objects into the execution environment. This was the quick and simple way. Ideally, We'd centrally cache the output of parse() but either copy the tree or keep a parallel tree of sorts, to avoid too much duplication.
Added some basic bits needed to operationalize components in Chalk, such as being able to ask for parameters on the command line (see params.nim) and to parse inputs that are expected to be Con4m literals. Note if the expected type is 'string' then we accept their entire input without quotes. Otherwise, we parse the text under the assumption it's a con4m literal.
as the url and extension are concatenated before the call to fetchAttempt() there is no need to normalize the url again
… are special cased instead of first class tokens. Changing this broke type conversion functions
…address, as external_ip()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.