-
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
⚡ Feature: Support for access modifiers, init scope #35
Open
deavmi
wants to merge
30
commits into
vardec_varass_dependency
Choose a base branch
from
feature/modifiers
base: vardec_varass_dependency
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
- Added methods `getAccessModifier()` and `getInitScope()` Parser - Renamed the `ModifierItem` methods - `parseClass()` now expects an optional access modifier followed by an optional BUT only init scope
deavmi
changed the title
Feature/modifiers
⚡ Feature: Support for access modifiers, init scope
Feb 29, 2024
- Added note about whether or not the default `AccessModifier` should be set here Parser - `parseName(...)` now accepts `allowModifiers` and `allowqInitScopesOnDec` - `parseName(...)` using `FuncDebug` - `parseName(...)` now explicitly passes arguments to `parseTypedDeclaration(...)` - Added `funcDebugPrint(string)`for use as our custom writer start when using `FuncDebug` - `parseBody(...)` now takes in `allowModifiers` - `parseBody(...)` now is using `FuncDebug` - `parseBody(...)` now explicitly passes parameters t `parseStatement(...)` - `popModifierFront()` nw has debug prints - Added a debug-only method for dumping the modifiers queue - `parseFuncDef(...)` now passes `false` t `parseBody(allowModifiers)` because within a function no statements may have modifiers - `parseTypedDeclaration(...)` haw `allowModifiers` nw - `parseTypedDeclaation(...)` now pops any valid acc mods and init scopes off when allowed and when it is a `Function` being built; at the end, if specified, these are then applied to said `Entity` - Disabled the old code in `parseTypedDeclaration(...)` - Disabled the old code in `parseClass(...)` - `parseStatement(...)` now takes in `allowModifiers` and will pass it into `parseName(...)` when called - `parseStatement(...)` now also supports modifiers such as ACC_MOD and INIT_SCOPEs but only is allowed to be specified - `parse()` now calls `parseName()` allowing access modifiers but NOT init scopes Parser (unittests) - Added a test for access modifiers Dub - Upgraded `niknaks` version
- Added negative test cases
- Fixed up the unittests in the `Parser` (and disabled some thing we can't access due to not have access to it via a given `Parser`) - Fixed imports in dependency.d and parser.d
- Updated `b.t` and `c.t` in hopes of fixing them for the new access-modifier based testing
- Added `accessCheck(Container yourContainer, Entity toCheck)`
- Added new exception type
- Added initial access checking method - Added access checks for `VariableExpression` and `FunctionCall`
- Updated `a.t`
- Typo fix
- `accessCheck(...)` cleaned up - Documented `accessCheckAuto(...)`
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.
Pleas see this.