parent
25bcb7a8d3
commit
b134fed9e9
35
mode/c.py
35
mode/c.py
|
@ -102,6 +102,41 @@ class CTabber2(tab.StackTabber2):
|
|||
return t.fqname() in ('spaces', 'eol', 'comment', 'comment.start',
|
||||
'comment.data', 'comment.null', 'comment.end')
|
||||
|
||||
#class CContext(context.Context):
|
||||
# def _regen_stack(self, y):
|
||||
# if y > 0 and self.namelines[y - 1][1]:
|
||||
# return list(self.namelines[y - 1][1])
|
||||
# else:
|
||||
# return []
|
||||
#
|
||||
# def _build_name_map(self, y1, y2, last, curr, stack):
|
||||
# highlights = self.mode.window.get_highlighter()
|
||||
#
|
||||
# i = y1
|
||||
# while i < y2:
|
||||
# if not stack: curr = None
|
||||
# tokens = highlights.tokens[i]
|
||||
#
|
||||
# result = self.class_match.match(tokens)
|
||||
# if result: curr = tokens[result[0] - self.class_offset].string
|
||||
# result = self.method_match.match(tokens)
|
||||
# if result: curr = tokens[result[0] - self.method_offset].string
|
||||
#
|
||||
# if curr is not None: self.names.setdefault(curr, i)
|
||||
#
|
||||
# for t in tokens:
|
||||
# if t.match('delimiter', '{'):
|
||||
# stack.append(curr)
|
||||
# elif t.match('delimiter', '}'):
|
||||
# if stack: stack.pop(-1)
|
||||
# if stack:
|
||||
# curr = stack[-1]
|
||||
# else:
|
||||
# curr = None
|
||||
#
|
||||
# if curr: self.namelines[i] = (curr, tuple(stack))
|
||||
# i += 1
|
||||
|
||||
class CCheckSyntax(method.shell.Exec):
|
||||
'''Build this C program (using the mode's make cmd)'''
|
||||
show_success = False
|
||||
|
|
Loading…
Reference in New Issue