raizcode-ofc 1.6.0 → 1.8.0

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/compilador.js CHANGED
@@ -111,7 +111,7 @@ if (!fs.existsSync(caminho)) {
111
111
 
112
112
  try {
113
113
  const arqRcx = nomeBase + '.rcx';
114
- const arqEstilo = nomeBase + '.estilo';
114
+ const arqRcc = nomeBase + '.rcc'; // Atualizado para buscar .rcc
115
115
 
116
116
  let htmlExtra = "";
117
117
  let cssExtra = "";
@@ -120,8 +120,8 @@ try {
120
120
  htmlExtra = traduzirEstrutura(fs.readFileSync(arqRcx, 'utf-8'));
121
121
  ehSite = true;
122
122
  }
123
- if (fs.existsSync(arqEstilo)) {
124
- cssExtra = traduzirEstilo(fs.readFileSync(arqEstilo, 'utf-8'));
123
+ if (fs.existsSync(arqRcc)) { // Agora busca o arquivo de estilo .rcc
124
+ cssExtra = traduzirEstilo(fs.readFileSync(arqRcc, 'utf-8'));
125
125
  ehSite = true;
126
126
  }
127
127
 
package/icons/rc.png ADDED
Binary file
package/icons/rcc.png ADDED
Binary file
package/icons/rcx.png ADDED
Binary file
package/package.json CHANGED
@@ -1,21 +1,24 @@
1
1
  {
2
2
  "name": "raizcode-ofc",
3
- "version": "1.6.0",
4
- "description": "Linguagem de programação Brasileira focada em simplicidade e performance.",
3
+ "version": "1.8.0",
4
+ "description": "Linguagem de programação Brasileira independente: RC (Lógica), RCX (Estrutura) e RCC (Estilo).",
5
5
  "main": "compilador.js",
6
6
  "bin": {
7
7
  "raizcode": "./compilador.js"
8
8
  },
9
9
  "scripts": {
10
10
  "test": "node compilador.js exemplos/teste.rc",
11
- "start": "node compilador.js"
11
+ "start": "node compilador.js",
12
+ "setup": "node compilador.js --setup"
12
13
  },
13
14
  "keywords": [
14
15
  "raizcode",
15
16
  "linguagem",
16
17
  "portugues",
17
18
  "compilador",
18
- "javascript"
19
+ "javascript",
20
+ "web",
21
+ "desenvolvimento"
19
22
  ],
20
23
  "author": "Riquefla",
21
24
  "license": "MIT",
@@ -23,12 +26,40 @@
23
26
  "node": ">=14.0.0"
24
27
  },
25
28
  "files": [
26
- "src/",
27
- "bin/",
28
29
  "icons/",
29
30
  "syntaxes/",
30
31
  "compilador.js",
31
32
  "package.json",
32
33
  "README.md"
33
- ]
34
- }
34
+ ],
35
+ "contributes": {
36
+ "languages": [
37
+ {
38
+ "id": "raizcode",
39
+ "aliases": ["Raizcode", "rc"],
40
+ "extensions": [".rc"],
41
+ "configuration": "./language-configuration.json",
42
+ "icon": { "dark": "./icons/rc.png", "light": "./icons/rc.png" }
43
+ },
44
+ {
45
+ "id": "raizcode-estrutura",
46
+ "aliases": ["Raizcode Estrutura", "rcx"],
47
+ "extensions": [".rcx"],
48
+ "icon": { "dark": "./icons/rcx.png", "light": "./icons/rcx.png" }
49
+ },
50
+ {
51
+ "id": "raizcode-estilo",
52
+ "aliases": ["Raizcode Estilo", "rcc"],
53
+ "extensions": [".rcc"],
54
+ "icon": { "dark": "./icons/rcc.png", "light": "./icons/rcc.png" }
55
+ }
56
+ ],
57
+ "grammars": [
58
+ {
59
+ "language": "raizcode",
60
+ "scopeName": "source.rc",
61
+ "path": "./syntaxes/raizcode.tmLanguage.json"
62
+ }
63
+ ]
64
+ }
65
+ }
package/bin/raizcode.js DELETED
File without changes
Binary file
package/src/generator.js DELETED
@@ -1,36 +0,0 @@
1
- // src/generator.js
2
- const mapaFlowwords = {
3
- 'mostrar': 'console.log',
4
- 'variavel': 'let',
5
- 'constante': 'const',
6
- 'se': 'if',
7
- 'fim': '}',
8
- 'funcao': 'function',
9
- 'repetir': 'for',
10
- 'entrada': 'prompt'
11
- };
12
-
13
- function traduzirLinha(linha) {
14
- let t = linha.trim();
15
- if (!t) return "";
16
-
17
- // Lógica simples de substituição (Nível 1)
18
- if (t.startsWith('mostrar ')) {
19
- return t.replace('mostrar ', 'console.log(') + ');';
20
- }
21
- if (t.startsWith('variavel ')) {
22
- // Transforma: variavel nome "Riquefla" -> let nome = "Riquefla";
23
- let partes = t.split(' ');
24
- return `let ${partes[1]} = ${partes.slice(2).join(' ')};`;
25
- }
26
- if (t.startsWith('se ')) {
27
- return `if (${t.replace('se ', '')}) {`;
28
- }
29
- if (t === 'fim') {
30
- return '}';
31
- }
32
-
33
- return t; // Se não conhecer, mantém (ex: cálculos matemáticos)
34
- }
35
-
36
- module.exports = { traduzirLinha };
package/src/lexer.js DELETED
File without changes
package/src/parser.js DELETED
File without changes