Skip to content

Commit

Permalink
issue fixed
Browse files Browse the repository at this point in the history
Co-authored-by: DominicR <DominicRuano@users.noreply.github.com>
Co-authored-by: CarmenMarroquin <CarmenMarroquin@users.noreply.github.com>
  • Loading branch information
sebas-v-c committed Jan 9, 2025
1 parent 2398d92 commit 14a477d
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 142 deletions.
6 changes: 3 additions & 3 deletions fases/fase3/parser/compiler/Translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default class FortranTranslator {

if (node.start) this.translatingStart = true;


const ruleTranslation = Template.rule({
id: node.id,
returnType: getReturnType(
Expand All @@ -86,10 +87,9 @@ export default class FortranTranslator {
.filter((expr) => expr instanceof CST.Pluck)
.map((label, j) => {
const expr = label.labeledExpr.annotatedExpr.expr;
console.log(election)
return `${
expr instanceof CST.Identificador
? getReturnType(getActionId(expr.id, election.action ? i : 0), this.actionReturnTypes)
? getReturnType(getActionId(expr.id, 0), this.actionReturnTypes)
: "character(len=:), allocatable"
} :: expr_${i}_${j}`;
})
Expand Down Expand Up @@ -702,7 +702,7 @@ export default class FortranTranslator {
paramDeclarations: Object.entries(node.params).map(
([label, ruleId]) =>
`${getReturnType(
getActionId(ruleId, this.currentChoice),
getActionId(ruleId, 0),
this.actionReturnTypes
)} :: ${label}`
),
Expand Down
2 changes: 1 addition & 1 deletion test/test1/input.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3 * 2 * 4 * 5 * 7 * 8 + 23 + 384 * 78 + 29 + 5 * 5
2+3*4+5*6
Loading

0 comments on commit 14a477d

Please sign in to comment.