mirror of https://github.com/tbklang/tlang.git
Casting improvement, parseTypedDeclaration() #110
Labels
No Label
dependency
emit
hashmapper
lebanonmapper
lexer
meta
needsfix
parser
qol
question
resolution
typing
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
Blocks
#87 Casting support
tlang/tlang
Reference: tlang/tlang#110
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is this?
To add support for
parseType()
which could hold the code thatparseTypedDeclaration()
uses when it parses the<type> <identifier> ['=' <assigment>] ';'
(the<type>
part).Technically this will help us with:
parseCast()
#87Solution potentiale
We could rather keep
parseTypedDeclaration(...)
as is and add another default argumentbool wantsAssignment
(or RATHER re-use that maybe to mean assignment in the cases of non function?)We do this already look...
Okay, next thing though - it returns a
TypedEntity
and DOES expect an identifier. We may need to add a new flag to saydontExpectIdentifier
.Solution potentiale 2 ✅
onlyType=true
, then we stop there rather.parseTypedDeclaration(onlyType=true)
byparseCast()
we can then extract the typeString from theTypedEntity
.vardec_varass_dependencyto castingNous sommes en allent avec solution potentiale deux comme de commit
990b8a7d8721103d2181225ac5c6d40ee265a340
(tag:parsetypeddeclaration_onlytype_parsecast_new
)parseType()to Casting improvement, parseTypedDeclaration()Merging this now to
vardec_varass_dependency
Re-opened just because we should first test this - see how well it goes, then close it.
I should be able to close this soon, seems I was able to integrate this into both the
arrays
andpointers
branch correctly.I believe this should be able to be closed when we are finished working on #81.
#87 is more long term
I'm going to close this for now, we can always make a new issue later - it seems pretty good now (casting support that is).
Also closed #87