Commit 1f474a42 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Debugger: Use enum to describe token type

Change-Id: Icbd72999f5d688cce63f54e1f8570b9bb0372f90
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent e5bee53d
......@@ -104,17 +104,16 @@ def qdump__Utils__ElfSection(d, value):
d.putPlainChildren(value)
def qdump__CPlusPlus__Token(d, value):
k = int(value["f"]["kind"])
k = value["f"]["kind"]
if int(k) == 6:
d.putValue("T_IDENTIFIER. offset: %d, len: %d"
% (value["offset"], value["f"]["length"]))
elif int(k) == 7:
d.putValue("T_NUMERIC_LITERAL. offset: %d, value: %d"
% (value["offset"], value["f"]["length"]))
elif int(k) == 60:
d.putValue("T_RPAREN")
else:
d.putValue("Type: %s" % k)
val = str(k.cast(d.lookupType("CPlusPlus::Kind")))
d.putValue(val[11:]) # Strip "CPlusPlus::"
d.putPlainChildren(value)
def qdump__CPlusPlus__Internal__PPToken(d, value):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment