summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/ply
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/ply')
-rw-r--r--bitbake/lib/ply/yacc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/ply/yacc.py b/bitbake/lib/ply/yacc.py
index 6168fd9a03..d50886ed2f 100644
--- a/bitbake/lib/ply/yacc.py
+++ b/bitbake/lib/ply/yacc.py
@@ -195,6 +195,8 @@ class YaccProduction:
195 self.lexer = None 195 self.lexer = None
196 self.parser= None 196 self.parser= None
197 def __getitem__(self,n): 197 def __getitem__(self,n):
198 if isinstance(n,slice):
199 return [self[i] for i in range(*(n.indices(len(self.slice))))]
198 if n >= 0: return self.slice[n].value 200 if n >= 0: return self.slice[n].value
199 else: return self.stack[n].value 201 else: return self.stack[n].value
200 202