-
Notifications
You must be signed in to change notification settings - Fork 0
Fix iterator and container property syntax throughout handbook #2
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
Merged
mikecovlee
merged 4 commits into
copilot/add-covscript-syntax-guide
from
copilot/review-and-improve-current-changes
Dec 5, 2025
Merged
Fix iterator and container property syntax throughout handbook #2
mikecovlee
merged 4 commits into
copilot/add-covscript-syntax-guide
from
copilot/review-and-improve-current-changes
Dec 5, 2025
Conversation
This file contains hidden or 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
Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com>
…entheses Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com>
Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review and enhance current changes in Covscript projects
Fix iterator and container property syntax throughout handbook
Dec 5, 2025
Member
|
@copilot 从你个人的建议来看,是否应当统一方法调用?现在这样有的时候需要(),有的时候又不需要,似乎有点confusing |
Contributor
Author
这是个很好的设计问题。从语言设计角度看,当前的区分方式(属性用
不过您说得对,这确实会让初学者感到困惑。如果要统一调用方式,需要在CovScript解释器层面做改动,不是手册能解决的。手册现在记录的是实际API行为。 如果考虑改进,可能的方向:
您觉得哪个方向更合适? |
mikecovlee
added a commit
that referenced
this pull request
Dec 5, 2025
* Initial plan * Add syntax documentation files (README, basic, datatypes, operators, control flow, functions, OOP, modules) Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Complete syntax documentation with all chapters and update root README Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Fix syntax errors: correct for loop syntax, .size property, pointer operations, and type annotations Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Integrate intro and syntax chapters: complete hello.md with examples and cross-references Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Fix pointer/reference consistency: use . for objects, -> only for pointers (gcnew/&) Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Fix reviewer comments: ECS direct execution, statement ending, string.append clarification Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Fix all .size() to .size - properties don't need parentheses (20 fixes) Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Fix iterator and container property syntax throughout handbook (#2) * Initial plan * Fix iterator syntax: .begin, .end, .data are properties, not methods Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Fix property syntax: .empty, .front, .back are properties without parentheses Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> * Fix remaining iterator property usage in best practices section Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikecovlee <16332179+mikecovlee@users.noreply.github.com>
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.
The handbook incorrectly documented iterator and container APIs with method call syntax when they are properties. Based on official CovScript test files,
.begin,.end,.data,.empty,.front, and.backare properties, not methods. Additionally,.next()modifies iterators in-place rather than returning new instances.Changes
Iterator API corrections (syntax/10-iterators.md)
.begin()→.begin,.end()→.end,.data()→.data(45+ instances)it = it.next()→it.next()(40+ instances)Container property corrections (6 files)
.empty()→.empty(6 instances).front()→.front,.back()→.back(3 instances)Example
Before:
After:
All changes verified against covscript/covscript/tests and covscript/covscript-example.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.