Changeset 60288f5 in buchla-68k for misc/check-glob.py


Ignore:
Timestamp:
07/09/2017 12:23:40 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
6dd74a9
Parents:
0c834c5
Message:

Make function pointers more consistent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/check-glob.py

    r0c834c5 r60288f5  
    1313        self.path = None
    1414        self.decl = {}
     15        self.errs = []
    1516
    1617    def visit_Typedef(self, node):
     
    3233
    3334        elif self.decl[node.name] != decl:
    34             raise Exception("mismatch for {} in {}:{}: {} <-> {}". \
    35                             format(node.name, node.coord.file, node.coord.line, \
    36                                    self.decl[node.name], decl))
     35            self.errs.append("mismatch for {} in {}:{}: {} <-> {}". \
     36                             format(node.name, node.coord.file, node.coord.line, \
     37                                    self.decl[node.name], decl))
    3738
    3839    def visit_FuncDef(self, node):
     
    4647        self.visit(ast)
    4748        self.path = None
     49
     50    def show_errs(self):
     51        for err in self.errs:
     52            print(err)
    4853
    4954path_ast = []
     
    7580
    7681print("")
     82vis.show_errs()
Note: See TracChangeset for help on using the changeset viewer.