Skip to content

Commit 8f8301a

Browse files
committed
Remove some comments
1 parent 1d3f597 commit 8f8301a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

semantic_analyser.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def visitSimpleAssignment(self, ctx: MyParser.SimpleAssignmentContext):
8383
ctx.parser.notifyErrorListeners(
8484
"Incompatible types in an assignment", ctx.getChild(1).getSymbol()
8585
)
86-
else: ## a[0] = 1
86+
else: # a[0] = 1
8787
reference = self.visit(ctx.elementReference())
8888
new_type = self.visit(ctx.expression())
8989
if isinstance(new_type, Int):
@@ -97,7 +97,7 @@ def visitCompoundAssignment(self, ctx: MyParser.CompoundAssignmentContext):
9797
if ctx.id_(): # a = 1
9898
old_type = self.visit(ctx.id_())
9999
new_type = self.visit(ctx.expression())
100-
else: ## a[0] = 1
100+
else: # a[0] = 1
101101
old_type = self.visit(ctx.elementReference())
102102
new_type = self.visit(ctx.expression())
103103
try:
@@ -194,11 +194,9 @@ def visitSpecialMatrixFunction(self, ctx: MyParser.SpecialMatrixFunctionContext)
194194
if not all(isinstance(dim, Int) for dim in dims):
195195
ctx.parser.notifyErrorListeners(
196196
"Matrix dimentions must be integers", ctx.getChild(0).getSymbol()
197-
) # todo: add more specific symbol
197+
)
198198
return
199-
return Vector(
200-
tuple(dim.value for dim in dims), Int()
201-
) # todo: return Int(0) or Int(1)
199+
return Vector(tuple(dim.value for dim in dims), Int())
202200

203201
def visitBreak(self, ctx: MyParser.BreakContext):
204202
if self.nested_loop_counter == 0:

0 commit comments

Comments
 (0)