Skip to content
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

Implement Constant expressions #13944

Open
5 of 22 tasks
hasithaa opened this issue Feb 27, 2019 · 3 comments
Open
5 of 22 tasks

Implement Constant expressions #13944

hasithaa opened this issue Feb 27, 2019 · 3 comments
Labels
Area/Compiler SwanLake2023 Temporary Label for issue to be fixed immediately. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/NewFeature Type/SpecDeviation

Comments

@hasithaa
Copy link
Contributor

hasithaa commented Feb 27, 2019

Tasks.

Constant support the following expressions.

  • literal
  • list-constructor-expr
  • mapping-constructor-expr
  • table-constructor-expr
  • string-template-expr
  • xml-expr
  • constant-reference-expr
  • type-cast-expr
  • unary-expr
  • multiplicative-expr
  • mod-expr
  • additive-expr
  • shift-expr
  • range-expr
  • numerical-comparison-expr
  • is-expr
  • equality-expr
  • binary-bitwise-expr
  • logical-expr
  • conditional-expr
  • ( const-expr )

Module constant declaration is partially implemented

  • support [public] const [type-descriptor] identifier = const-expr ;
@hasithaa hasithaa added this to Created in Ballerina Compiler Team Tasks via automation Feb 27, 2019
@hasithaa hasithaa moved this from Created to Expressions and Statements in Ballerina Compiler Team Tasks Feb 27, 2019
@Shan1024 Shan1024 self-assigned this Feb 27, 2019
@hasithaa hasithaa moved this from Expressions and Statements to Sprint Issue Pool in Ballerina Compiler Team Tasks Mar 13, 2019
@hasithaa hasithaa moved this from Sprint Pool - 0.995 (Next Release) to Open Issues in Ballerina Compiler Team Tasks Apr 18, 2019
@anupama-pathirage anupama-pathirage added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Apr 30, 2019
@hasithaa hasithaa moved this from Open Issues to JBallerina 1.1-Alpha Tasks in Ballerina Compiler Team Tasks Aug 2, 2019
@rdhananjaya rdhananjaya added this to Needs triage in Ballerina Compiler Bug triage via automation Oct 17, 2019
@rdhananjaya rdhananjaya moved this from Needs triage to Features and Tasks (1.1.X) in Ballerina Compiler Bug triage Oct 17, 2019
@rdhananjaya rdhananjaya added this to the Ballerina 1.1.0 milestone Oct 17, 2019
@hasithaa hasithaa changed the title Implement const support Implement Constant expressions Oct 24, 2019
@hasithaa hasithaa added the Spec/2019R3 Related to Ballerina Spec 2019R3 label Oct 24, 2019
@hasithaa hasithaa moved this from Features and Tasks (1.1.X) to [Reviewed] Features in Ballerina Compiler Bug triage Oct 24, 2019
@hasithaa hasithaa removed this from the Ballerina 1.1.0 milestone Oct 24, 2019
@rdhananjaya
Copy link
Member

I think we also need to support constants of named integer subtypes.
As of swanlake alpha-4 it says constant cannot be defined with type 'int:Signed32', expected a simple basic types or a map of a simple basic type

@prakanth97
Copy link
Contributor

unary-expr is fixed in #30693. Shall update the description?

@gayalkuruppu
Copy link
Contributor

IMO constant expression list-constructor-expr here is a somewhat highly used scenario in coding. Better if we can prioritise that case. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Compiler SwanLake2023 Temporary Label for issue to be fixed immediately. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/NewFeature Type/SpecDeviation
Projects
No open projects
Ballerina Compiler Bug triage
  
📦 Features and Task
Development

No branches or pull requests

6 participants