Skip to content

Commit 9783b8f

Browse files
Adicionado nome completo nos arquivos carregados
1 parent a0a192b commit 9783b8f

File tree

7 files changed

+1890
-1684
lines changed

7 files changed

+1890
-1684
lines changed

Analise.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,7 @@ private void nivelRaiz(ref Trechos trechos)
830830
nomeImport += ".hcb";
831831
if(File.Exists(nomeImport))
832832
{
833+
nomeImport = Path.GetFullPath(nomeImport);
833834
if(!Fontes.Any(f => f.NomeCompleto == nomeImport))
834835
Processar(new Fonte(nomeImport));
835836
}

Distro/Atual/hcbasic.dll

1.5 KB
Binary file not shown.

Distro/Atual/hcbasic.pdb

364 Bytes
Binary file not shown.

Fonte.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Fonte
88
public Fonte(string endereco)
99
{
1010
_arq = new FileStream(endereco, FileMode.Open, FileAccess.Read);
11-
NomeCompleto = Path.GetFullPath(endereco);
11+
NomeCompleto = endereco;
1212
_leitor = new StreamReader(_arq);
1313
}
1414

Nos/Estrutura.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ protected override void InicializaInterno(Ambiente amb)
2525
{
2626
InicializaLista(new List<No>(Campos), amb);
2727
Estrutura? cons = amb.PesquisaEstrutura(Nome);
28-
if(cons != null && cons != this) throw Erro($"Estrutura {Nome} já existe.");
29-
cons = amb.PesquisaModulo(Nome);
30-
//if(cons != null) throw Erro($"Já existe um módulo com o nome {Nome}.");
28+
if(cons != null && cons != this) throw Erro($"Estrutura {Nome} já existe em {cons.Trecho.Fonte.NomeCompleto}:{cons.Trecho.Linha}.");
3129
int posicao = 0;
3230
foreach (var item in Campos)
3331
{

Nos/Modulo.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ protected override void InicializaInterno(Ambiente amb)
5151
}
5252
amb.Modulo = null;
5353
Estrutura? cons = amb.PesquisaModulo(Nome);
54-
if(cons != null && cons != this) throw Erro($"Módulo {Nome} já existe.");
55-
cons = amb.PesquisaEstrutura(Nome);
56-
//if(cons != null) throw Erro($"Já existe uma estrutura com o nome {Nome}.");
54+
if(cons != null && cons != this) throw Erro($"Módulo {Nome} já existe em {cons.Trecho.Fonte.NomeCompleto}:{cons.Trecho.Linha}.");
5755
}
5856

5957
protected override No OtimizaInterno(Ambiente amb)

0 commit comments

Comments
 (0)