Skip to content

Commit

Permalink
cleaning unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
thepercyj committed Aug 23, 2024
1 parent e3d70e1 commit 33ede4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
11 changes: 1 addition & 10 deletions src/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,16 +847,7 @@ def get_previous_value(self, var_name, index):
return values[index - 1]
else:
return None

def execute_function(self, node):
"""
Executes a function node.
Args:
node (tuple): The function node.
"""
_, func_name, params, body = node


def error(self, message):
"""
Raises an error with the given message.
Expand Down
10 changes: 5 additions & 5 deletions web/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ body {

/* Editor and Output container styling */
.code-editor, .output {
height: 100%; /* Make sure the height is defined */
max-height: calc(100% - 60px); /* Adjust the max-height as per your layout */
overflow-y: auto; /* Enable vertical scroll if content exceeds height */
overflow-x: hidden; /* Hide horizontal overflow */
height: 100%;
max-height: calc(100% - 60px);
overflow-y: auto;
overflow-x: hidden;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
Expand All @@ -74,7 +74,7 @@ body {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
height: calc(80vh - 100px); /* Adjust height considering container padding and margins */
height: calc(80vh - 100px);
}

.CodeMirror {
Expand Down
9 changes: 0 additions & 9 deletions web/static/js/script.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
// Initialize CodeMirror editor
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
mode: 'python',
lineNumbers: true,
theme: 'default'
});

// Example codes
const exampleCodes = {
example1: `print('Hello, World!')`,
example2: `for i in range(5):\n print('This is loop iteration', i)`,
example3: `x = 10\nif x > 5:\n print('x is greater than 5')\nelse:\n print('x is not greater than 5')`
};

// Function to load example code into the editor
function loadExampleCode(filename) {
fetch('/load_example/' + filename)
.then(response => response.text())
Expand Down

0 comments on commit 33ede4d

Please sign in to comment.