ether-code 0.4.2 → 0.4.4
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.
- package/cli/ether.js +6 -6
- package/ether-parser.js +9 -2
- package/package.json +1 -1
package/cli/ether.js
CHANGED
|
@@ -6,7 +6,7 @@ const http = require('http')
|
|
|
6
6
|
const { EtherCompiler } = require('./compiler')
|
|
7
7
|
const { Watcher } = require('./watcher')
|
|
8
8
|
|
|
9
|
-
const VERSION = '0.4.
|
|
9
|
+
const VERSION = '0.4.4'
|
|
10
10
|
|
|
11
11
|
const COLORS = {
|
|
12
12
|
reset: '\x1b[0m',
|
|
@@ -582,7 +582,7 @@ document
|
|
|
582
582
|
liste-non-ordonnee classe: "nav-links"
|
|
583
583
|
element-liste
|
|
584
584
|
lien href: "#features"
|
|
585
|
-
"
|
|
585
|
+
"Fonctionnalités"
|
|
586
586
|
element-liste
|
|
587
587
|
lien href: "#examples"
|
|
588
588
|
"Exemples"
|
|
@@ -592,7 +592,7 @@ document
|
|
|
592
592
|
|
|
593
593
|
div classe: "hero-content"
|
|
594
594
|
titre1 classe: "hero-title"
|
|
595
|
-
"
|
|
595
|
+
"Écrivez du code"
|
|
596
596
|
saut-ligne
|
|
597
597
|
span classe: "gradient-text"
|
|
598
598
|
"comme vous pensez"
|
|
@@ -613,12 +613,12 @@ document
|
|
|
613
613
|
div classe: "feature-icon"
|
|
614
614
|
"🎯"
|
|
615
615
|
titre3 "Intuitif"
|
|
616
|
-
paragraphe "
|
|
616
|
+
paragraphe "Écrivez du code en langage naturel. Plus besoin de mémoriser des syntaxes complexes."
|
|
617
617
|
article classe: "feature-card"
|
|
618
618
|
div classe: "feature-icon"
|
|
619
619
|
"⚡"
|
|
620
620
|
titre3 "Rapide"
|
|
621
|
-
paragraphe "Compilation
|
|
621
|
+
paragraphe "Compilation instantanée avec rechargement automatique en mode développement."
|
|
622
622
|
article classe: "feature-card"
|
|
623
623
|
div classe: "feature-icon"
|
|
624
624
|
"🌍"
|
|
@@ -632,7 +632,7 @@ document
|
|
|
632
632
|
|
|
633
633
|
section id: "examples", classe: "examples"
|
|
634
634
|
titre2 classe: "section-title"
|
|
635
|
-
"Simple et
|
|
635
|
+
"Simple et élégant"
|
|
636
636
|
div classe: "code-comparison"
|
|
637
637
|
div classe: "code-block"
|
|
638
638
|
div classe: "code-header"
|
package/ether-parser.js
CHANGED
|
@@ -81,7 +81,7 @@ class EtherParser {
|
|
|
81
81
|
expect(type) {
|
|
82
82
|
const token = this.current()
|
|
83
83
|
if (!token || token.type !== type) {
|
|
84
|
-
throw new Error(`Attendu ${type},
|
|
84
|
+
throw new Error(`Attendu ${type}, reçu ${token ? token.type : 'EOF'}`)
|
|
85
85
|
}
|
|
86
86
|
return this.advance()
|
|
87
87
|
}
|
|
@@ -306,7 +306,14 @@ class EtherParser {
|
|
|
306
306
|
break
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
if (token.type === TokenType.
|
|
309
|
+
if (token.type === TokenType.DOUBLE_COLON) {
|
|
310
|
+
this.advance()
|
|
311
|
+
const pseudoName = this.current()
|
|
312
|
+
if (pseudoName && pseudoName.type === TokenType.IDENTIFIER) {
|
|
313
|
+
parts.push('::' + pseudoName.value)
|
|
314
|
+
this.advance()
|
|
315
|
+
}
|
|
316
|
+
} else if (token.type === TokenType.COLON) {
|
|
310
317
|
this.advance()
|
|
311
318
|
const next = this.current()
|
|
312
319
|
if (next && next.type === TokenType.COLON) {
|