firefly-compiler 0.4.85 → 0.4.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1185,8 +1185,14 @@ extend self: Parser {
1185
1185
 
1186
1186
  parseDynamicMember(record: Term): Term {
1187
1187
  self.skip(LArrowThin)
1188
- let token = self.skip(LLower)
1189
- let member = EString(token.at(), "\"" + token.raw() + "\"")
1188
+ let token = if(self.current().is(LUpper)) {
1189
+ self.skip(LUpper)
1190
+ } elseIf {self.current().is(LLower)} {
1191
+ self.skip(LLower)
1192
+ } else {
1193
+ self.skip(LString)
1194
+ }
1195
+ let member = EString(token.at(), if(token.is(LString)) {token.raw()} else {"\"" + token.raw() + "\""})
1190
1196
  if(self.current().rawIs("(")) {
1191
1197
  let arguments = self.parseFunctionArguments(record.at, False)
1192
1198
  let effect = self.freshUnificationVariable(record.at)
@@ -1540,8 +1540,14 @@ return result_
1540
1540
 
1541
1541
  export function Parser_parseDynamicMember(self_, record_) {
1542
1542
  ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LArrowThin());
1543
- const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower());
1544
- const member_ = ff_compiler_Syntax.EString(ff_compiler_Token.Token_at(token_), (("\"" + ff_compiler_Token.Token_raw(token_)) + "\""));
1543
+ const token_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUpper())
1544
+ ? ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LUpper())
1545
+ : ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LLower())
1546
+ ? ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower())
1547
+ : ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LString()));
1548
+ const member_ = ff_compiler_Syntax.EString(ff_compiler_Token.Token_at(token_), (ff_compiler_Token.Token_is(token_, ff_compiler_Token.LString())
1549
+ ? ff_compiler_Token.Token_raw(token_)
1550
+ : (("\"" + ff_compiler_Token.Token_raw(token_)) + "\"")));
1545
1551
  if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "(")) {
1546
1552
  const arguments_ = ff_compiler_Parser.Parser_parseFunctionArguments(self_, record_.at_, false);
1547
1553
  const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
@@ -3103,8 +3109,14 @@ return result_
3103
3109
 
3104
3110
  export async function Parser_parseDynamicMember$(self_, record_, $task) {
3105
3111
  ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LArrowThin());
3106
- const token_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower());
3107
- const member_ = ff_compiler_Syntax.EString(ff_compiler_Token.Token_at(token_), (("\"" + ff_compiler_Token.Token_raw(token_)) + "\""));
3112
+ const token_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LUpper())
3113
+ ? ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LUpper())
3114
+ : ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LLower())
3115
+ ? ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LLower())
3116
+ : ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LString()));
3117
+ const member_ = ff_compiler_Syntax.EString(ff_compiler_Token.Token_at(token_), (ff_compiler_Token.Token_is(token_, ff_compiler_Token.LString())
3118
+ ? ff_compiler_Token.Token_raw(token_)
3119
+ : (("\"" + ff_compiler_Token.Token_raw(token_)) + "\"")));
3108
3120
  if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "(")) {
3109
3121
  const arguments_ = ff_compiler_Parser.Parser_parseFunctionArguments(self_, record_.at_, false);
3110
3122
  const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.85",
7
+ "version": "0.4.87",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.85",
7
+ "version": "0.4.87",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dynamic-member": {
41
41
  "name": "string.unquoted.firefly",
42
- "match": "(?<=[-][>][ ]*)[a-z][A-Za-z0-9]*\\b"
42
+ "match": "(?<=[-][>][ ]*)[A-Za-z][A-Za-z0-9]*\\b"
43
43
  },
44
44
  "field-or-call": {
45
45
  "name": "entity.name.function.member.firefly",