changeset 214:6875360e8390

Remove semantics
author Windel Bouwman
date Fri, 05 Jul 2013 11:18:58 +0200
parents 003c8a976fff
children c1ccb1cb4cef
files python/c3/semantics.py
diffstat 1 files changed, 0 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/python/c3/semantics.py	Fri Jul 05 11:18:48 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-from . import astnodes
-from .scope import Scope, topScope
-from ppci import CompilerError
-
-class Semantics:
-   """ This class constructs the AST from parser input """
-   def __init__(self, diag):
-      self.diag = diag
-   def addSymbol(self, s):
-      if self.curScope.hasSymbol(s.name):
-         msg = 'Redefinition of {0}'.format(s.name)
-         raise CompilerError(msg, s.loc)
-      else:
-         self.curScope.addSymbol(s)
-   def actOnFuncDef2(self, parameters, returntype, body):
-      self.curFunc.body = body
-      paramtypes = [p.typ for p in parameters]
-      self.curFunc.typ = astnodes.FunctionType(paramtypes, returntype)
-      self.curFunc = None
-      self.curScope = self.curScope.parent
-