Skip to content

Commit

Permalink
Merge branch 'sauppb:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sauppb authored Aug 2, 2023
2 parents e994666 + fb7f32c commit 51d8336
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
</head>
<body>
<header class="nav-bar">
<h1>Praxly beta 0.0</h1>
<h1>Praxly beta</h1>
<div id="myModal" class="modal">

<!-- Modal content -->
Expand Down
5 changes: 5 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

h1 {
font-family: sans-serif;
}

body {
display: flex;
flex-direction: column;
margin: 0;

}

Expand All @@ -11,6 +15,7 @@ body {
background: #d9dbda;
margin: 10px;
height: 10vh;
padding: 10px;
}

main {
Expand Down
12 changes: 6 additions & 6 deletions src/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,12 +688,12 @@ class Praxly_codeBlock {
const element = this.praxly_blocks[i];

//aborts if it detects a return statement. Hopefully this doesn't cause problems later ahaha
if (element?.isreturn) {
return element.evaluate(environment);
} else {
element.evaluate(environment);
}
}
if (element?.isreturn) {
return element.evaluate(environment);
} else {
element.evaluate(environment);
}
}

return "Exit_Success";
}
Expand Down
4 changes: 2 additions & 2 deletions src/lexer-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1319,8 +1319,8 @@ statement() {
else {
// console.log(`the current token is ${this.tokens[this.i].token_type} and the next one is ${this.tokens[this.i + 1].token_type}`)
let contents = this.boolean_operation();
if (contents === undefined){
contents = null;
if (contents === undefined || contents === null){
return;
}
if (this.has(';')){
this.advance();
Expand Down
4 changes: 2 additions & 2 deletions src/tree2text.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const tree2text = (blockjson, startIndex, indentation) => {
}
case 'COMMENT':
try {
var result = '/*' + blockjson.value + '*/';
var result = '/*' + blockjson.value + '*/\n';
blockjson.startIndex = startIndex;
blockjson.endIndex = startIndex + result.length;
blockjson.beg = startIndex;
Expand All @@ -71,7 +71,7 @@ export const tree2text = (blockjson, startIndex, indentation) => {
}
case 'SINGLE_LINE_COMMENT':
try {
var result = '// ' + blockjson.value;
var result = '// ' + blockjson.value + '\n';
blockjson.startIndex = startIndex;
blockjson.endIndex = startIndex + result.length;
blockjson.beg = startIndex;
Expand Down

0 comments on commit 51d8336

Please sign in to comment.