]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: remove some dead code in apibuild.py
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 24 Sep 2019 16:29:11 +0000 (17:29 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 11 Nov 2019 11:18:40 +0000 (11:18 +0000)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
docs/apibuild.py

index af8595083cd1977f2dee097f6a14b1ecb1c4cb85..26bdb7e89081c22c315ce114b8bd1ce834b911e1 100755 (executable)
@@ -553,17 +553,10 @@ class CLexer:
                     self.tokens.append(('name', line[s:i]))
                     continue
                 if line[i] in "(){}:;,[]":
-#                 if line[i] == '(' or line[i] == ')' or line[i] == '{' or \
-#                   line[i] == '}' or line[i] == ':' or line[i] == ';' or \
-#                   line[i] == ',' or line[i] == '[' or line[i] == ']':
                     self.tokens.append(('sep', line[i]))
                     i = i + 1
                     continue
                 if line[i] in "+-*><=/%&!|.":
-#                 if line[i] == '+' or line[i] == '-' or line[i] == '*' or \
-#                   line[i] == '>' or line[i] == '<' or line[i] == '=' or \
-#                   line[i] == '/' or line[i] == '%' or line[i] == '&' or \
-#                   line[i] == '!' or line[i] == '|' or line[i] == '.':
                     if line[i] == '.' and i + 2 < l and \
                        line[i+1] == '.' and line[i+2] == '.':
                         self.tokens.append(('name', '...'))
@@ -572,10 +565,6 @@ class CLexer:
 
                     j = i + 1
                     if j < l and line[j] in "+-*><=/%&!|":
-#                       line[j] == '+' or line[j] == '-' or line[j] == '*' or \
-#                       line[j] == '>' or line[j] == '<' or line[j] == '=' or \
-#                       line[j] == '/' or line[j] == '%' or line[j] == '&' or \
-#                       line[j] == '!' or line[j] == '|'):
                         self.tokens.append(('op', line[i:j+1]))
                         i = j + 1
                     else:
@@ -585,18 +574,6 @@ class CLexer:
                 s = i
                 while i < l:
                     if line[i] not in " \t(){}:;,+-*/%&!|[]=><":
-#                        line[i] != ' ' and line[i] != '\t' and
-#                        line[i] != '(' and line[i] != ')' and
-#                        line[i] != '{'  and line[i] != '}' and
-#                        line[i] != ':' and line[i] != ';' and
-#                        line[i] != ',' and line[i] != '+' and
-#                        line[i] != '-' and line[i] != '*' and
-#                        line[i] != '/' and line[i] != '%' and
-#                        line[i] != '&' and line[i] != '!' and
-#                        line[i] != '|' and line[i] != '[' and
-#                        line[i] != ']' and line[i] != '=' and
-#                        line[i] != '*' and line[i] != '>' and
-#                        line[i] != '<'):
                         i = i + 1
                     else:
                         break