Skip to content

Commit

Permalink
Corrigir aplicação de modificadores
Browse files Browse the repository at this point in the history
  • Loading branch information
dgadelha committed Aug 10, 2023
1 parent 6dc0d41 commit 27feb1a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 18 deletions.
2 changes: 2 additions & 0 deletions packages/ide/src/app/tab-editor/tab-editor.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@

&:disabled {
cursor: not-allowed;
pointer-events: none;

svg {
filter: grayscale(1);
-webkit-transform: translateZ(0);
}
}
}
Expand Down
24 changes: 16 additions & 8 deletions packages/ide/src/app/tab-start/tab-start.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,24 @@

<hr />

<h4>📰 Novidades</h4>
<h4>📰&nbsp;&nbsp;Novidades</h4>
<p>
<strong>10/08/2023:</strong> Atualização de dependências. Colorir nome de funções (<a
href="https://github.com/dgadelha/Portugol-Webstudio/pull/72"
target="_blank"
rel="external noopener"
>PR #72</a
>, contribuído por <a href="https://github.com/6a8i" target="_blank" rel="external noopener">@6a8i</a>). Melhorias
na experiência de renomear e fechar abas.
<strong>10/08/2023:</strong>
</p>

<ul>
<li>Atualização de dependências.</li>
<li>
Colorir nome de funções (<a
href="https://github.com/dgadelha/Portugol-Webstudio/pull/72"
target="_blank"
rel="external noopener"
>PR #72</a
>, contribuído por <a href="https://github.com/6a8i" target="_blank" rel="external noopener">@6a8i</a>).
</li>
<li>Melhorias na experiência de renomear e fechar abas. Correção na aplicação de modificadores em variáveis.</li>
</ul>

<p><strong>10/12/2022:</strong> Correção no comportamento da concatenação.</p>
<p><strong>12/11/2022:</strong> Correção na verificação de tipos de argumentos de funções.</p>
</section>
Expand Down
16 changes: 12 additions & 4 deletions packages/ide/src/app/tab-start/tab-start.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ nav {
}

section {
max-width: 455px;
max-width: 600px;
margin: 20px;
text-align: justify;
letter-spacing: 0.25px;
padding: 0 15px;
font-family: "Lato", sans-serif;
color: #fff;
Expand All @@ -73,8 +73,16 @@ section {

h3,
h4,
p {
margin: 0.75rem 0;
p,
li {
margin: 0.5rem 0;
line-height: 1.5;
list-style-type: square;
}

ul {
margin: 0;
padding-left: 1.25rem;
}

mat-icon {
Expand Down
13 changes: 7 additions & 6 deletions packages/runtime/src/runtime/PortugolRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,30 +339,31 @@ class PortugolRuntime {
applyModifier(mod, item) {
console.log("applyModifier.init", { mod, item });
const result = item.clone();
switch (mod) {
case "+":
item.value = +item.value;
result.value = +item.value;
break;
case "-":
item.value = -item.value;
result.value = -item.value;
break;
case "!":
item.value = !item.value;
result.value = !item.value;
break;
case "~":
item.value = ~item.value;
result.value = ~item.value;
break;
default:
throw new Error("Modificador inválido: " + mod);
}
console.log("applyModifier.finish", { item });
return item;
console.log("applyModifier.finish", { result });
return result;
}
assumeMathType(...args) {
Expand Down

0 comments on commit 27feb1a

Please sign in to comment.