Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ynsta/steamcontroller.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStany MARCEL <stanypub@gmail.com>2015-11-04 22:31:36 +0300
committerStany MARCEL <stanypub@gmail.com>2015-11-04 22:31:36 +0300
commit475c60f94048f66985d616f23362a3440acd8371 (patch)
tree4bd32015bfd97dc512e9edd69fb1a26b04030529
parent6609e1ddf8d9b6ef3fa5a9d265b5cca481e6414e (diff)
Add some docstrings
Signed-off-by: Stany MARCEL <stanypub@gmail.com>
-rw-r--r--src/cheader.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cheader.py b/src/cheader.py
index b81b06d..67416a7 100644
--- a/src/cheader.py
+++ b/src/cheader.py
@@ -55,6 +55,8 @@ OPERATORS = {
def eval_expr(expr):
+ """ Eval and expression inside a #define using a suppart of python grammar """
+
def _eval(node):
if isinstance(node, ast.Num):
return node.n
@@ -73,6 +75,8 @@ def eval_expr(expr):
def defines(base, include):
+ """ Extract #define from base/include following #includes """
+
parsed = set()
fname = os.path.normpath(os.path.abspath(os.path.join(base, include)))
parsed.add(fname)