ether-code 0.5.0 → 0.5.3

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.
@@ -559,13 +559,16 @@ class EtherLexer {
559
559
  }
560
560
 
561
561
  if (this.peek() === 'e' || this.peek() === 'E') {
562
- type = TokenType.FLOAT
563
- value += this.advance()
564
- if (this.peek() === '+' || this.peek() === '-') {
565
- value += this.advance()
566
- }
567
- while (this.isDigit(this.peek())) {
562
+ const nextChar = this.peek(1)
563
+ if (this.isDigit(nextChar) || nextChar === '+' || nextChar === '-') {
564
+ type = TokenType.FLOAT
568
565
  value += this.advance()
566
+ if (this.peek() === '+' || this.peek() === '-') {
567
+ value += this.advance()
568
+ }
569
+ while (this.isDigit(this.peek())) {
570
+ value += this.advance()
571
+ }
569
572
  }
570
573
  }
571
574
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ether-code",
3
- "version": "0.5.0",
3
+ "version": "0.5.3",
4
4
  "description": "Ether - Le langage intentionnel",
5
5
  "main": "cli/compiler.js",
6
6
  "bin": {