TODO: Docstring for _handle_struct_call_type_decl.

        :node: TODO
        :scope: TODO
        :ctxt: TODO
        :stream: TODO
        :returns: TODO
775930
def _handle_struct_call_type_decl(self, node, scope, ctxt, stream):
        
        self._dlog("handling struct with parameters")

        struct_cls = self._handle_node(node.type, scope, ctxt, stream)
        struct_args = self._handle_node(node.args, scope, ctxt, stream)

        res = StructDeclWithParams(scope, struct_cls, struct_args)
        return res
262978
function doesMemberExpressionContainCallExpression(node) {
            let currentNode = node.object;
            let currentNodeType = node.object.type;

            while (currentNodeType === "MemberExpression") {
                currentNode = currentNode.object;
                currentNodeType = currentNode.type;
            }

            return currentNodeType === "CallExpression";
        }
637201
def _handle_struct(self, node, scope, ctxt, stream):
        
        self._dlog("handling struct")

        if node.args is not None:
            for param in node.args.params:
                param.is_func_param = True

        # it's actually being defined
        if node.decls is not None:
            struct_cls = StructUnionDef("struct", self, node)

            if node.name is not None:
                scope.add_type_class(node.name, struct_cls)

            return struct_cls

        # it's declaring a struct field. E.g.
        #    struct IFD subDir;
        else:
            return scope.get_type(node.name)
692130
function visitTypedVariableDeclarator(traverse, node, path, state) {
  var ctx = new Context(state);
  if (node.init) {
    utils.catchup(node.init.range[0], state);
    utils.append(ctx.getProperty('check') + '(', state);
    traverse(node.init, path, state);
    utils.catchup(node.init.range[1], state);
    utils.append(', ' + ctx.getType(node.id.typeAnnotation.typeAnnotation) + ')', state);
  }
  utils.catchup(node.range[1], state);
  return false;
}
152290
def _handle_packed_metadata(self, node, scope, ctxt, stream):
        
        keyvals = node.metadata.keyvals
        if "packer" not in keyvals and ("pack" not in keyvals or "unpack" not in keyvals):
            raise errors.PfpError("Packed fields require a packer function to be set or pack and unpack functions to be set")
        if "packtype" not in keyvals:
            raise errors.PfpError("Packed fields require a packtype to be set")

        args_ = {}
        if "packer" in keyvals:
            packer_func_name = keyvals["packer"]
            packer_func = scope.get_id(packer_func_name)
            args_["packer"] = packer_func
        elif "pack" in keyvals and "unpack" in keyvals:
            pack_func = scope.get_id(keyvals["pack"])
            unpack_func = scope.get_id(keyvals["unpack"])
            args_["pack"] = pack_func
            args_["unpack"] = unpack_func

        packtype_cls_name = keyvals["packtype"]
        packtype_cls = scope.get_type(packtype_cls_name)
        args_["pack_type"] = packtype_cls

        args_["type"] = "packed"
        args_["func_call_info"] = (ctxt, scope, stream, self, self._coord)
        return args_
1026761
def _handle_enum(self, node, scope, ctxt, stream):
        
        self._dlog("handling enum")
        if node.type is None:
            enum_cls = fields.Int
        else:
            enum_cls = self._handle_node(node.type, scope, ctxt, stream)

        enum_vals = {}
        curr_val = enum_cls()
        curr_val._pfp__value = -1
        for enumerator in node.values.enumerators:
            if enumerator.value is not None:
                curr_val = self._handle_node(enumerator.value, scope, ctxt, stream)
            else:
                curr_val = curr_val + 1
            curr_val._pfp__freeze()
            enum_vals[enumerator.name] = curr_val
            enum_vals[fields.PYVAL(curr_val)] = enumerator.name
            scope.add_local(enumerator.name, curr_val)

        if node.name is not None:
            enum_cls = EnumDef(node.name, enum_cls, enum_vals)
            scope.add_type_class(node.name, enum_cls)

        else:
            enum_cls = EnumDef("enum_" + enum_cls.__name__, enum_cls, enum_vals)
            # don't add to scope if we don't have a name

        return enum_cls
927849
def _handle_compound(self, node, scope, ctxt, stream):
        
        self._dlog("handling compound statement")
        #scope.push()

        try:
            for child in node.children():
                self._handle_node(child, scope, ctxt, stream)

        # in case a return occurs, be sure to pop the scope
        # (returns are implemented by raising an exception)
        finally:
            #scope.pop()
            pass
1255982
def _handle_expr_list(self, node, scope, ctxt, stream):
        
        self._dlog("handling expression list")
        exprs = [
            self._handle_node(expr, scope, ctxt, stream) for expr in node.exprs
        ]
        return exprs
112236
def _node_type(st):
    
    _types = [
        (stat.S_ISBLK, "block device"),
        (stat.S_ISCHR, "character device"),
        (stat.S_ISFIFO, "named pipe"),
        (stat.S_ISSOCK, "socket")
    ]
    for t in _types:
        if t[0](st.st_mode):
            return t[1]
307608
function getCurrentScope(statementType) {
            let currentScope;

            if (statementType === "var") {
                currentScope = functionStack[functionStack.length - 1];
            } else if (statementType === "let") {
                currentScope = blockStack[blockStack.length - 1].let;
            } else if (statementType === "const") {
                currentScope = blockStack[blockStack.length - 1].const;
            }
            return currentScope;
        }
727529
def build_api_struct(self):
        
        self.clean()
        r = {
            "type": self._type,
            "requested": self._requested,
            "value": self._value
        }
        if self._tags:
            r["tags"] = self._tags

        return r
1162390
def _VAR_DECL_type(self, cursor):
        """"""
        # Get the type
        _ctype = cursor.type.get_canonical()
        log.debug('VAR_DECL: _ctype: %s ', _ctype.kind)
        # FIXME: Need working int128, long_double, etc.
        if self.is_fundamental_type(_ctype):
            ctypesname = self.get_ctypes_name(_ctype.kind)
            _type = typedesc.FundamentalType(ctypesname, 0, 0)
        elif self.is_unexposed_type(_ctype):
            st = 'PATCH NEEDED: %s type is not exposed by clang' % (
                self.get_unique_name(cursor))
            log.error(st)
            raise RuntimeError(st)
        elif self.is_array_type(_ctype) or _ctype.kind == TypeKind.RECORD:
            _type = self.parse_cursor_type(_ctype)
        elif self.is_pointer_type(_ctype):
            # for example, extern Function pointer
            if self.is_unexposed_type(_ctype.get_pointee()):
                _type = self.parse_cursor_type(
                    _ctype.get_canonical().get_pointee())
            elif _ctype.get_pointee().kind == TypeKind.FUNCTIONPROTO:
                # Function pointers
                # Arguments are handled in here
                _type = self.parse_cursor_type(_ctype.get_pointee())
            else:  # Pointer to Fundamental types, structs....
                _type = self.parse_cursor_type(_ctype)
        else:
            # What else ?
            raise NotImplementedError(
                'What other type of variable? %s' %
                (_ctype.kind))
        log.debug('VAR_DECL: _type: %s ', _type)
        return _type
78419
def visit_Call(self, node):
        
        if self.depth == 0:
            return node

        if self.ignore_exceptions is None:
            ignore_exceptions = ast.Name("None", ast.Load())

        else:
            ignore_exceptions = ast.List(self.ignore_exceptions, ast.Load())

        catch_exception_type = self.catch_exception \
            if self.catch_exception else "None"

        catch_exception = ast.Name(catch_exception_type, ast.Load())
        depth = ast.Num(self.depth - 1 if self.depth > 0 else -1)

        debug_node_name = ast.Name("debug", ast.Load())
        call_extra_parameters = [] if IS_PYTHON_3 else [None, None]
        node.func = ast.Call(debug_node_name,
                             [node.func, ignore_exceptions,
                              catch_exception, depth],
                             [], *call_extra_parameters)

        return node
1007257
def track_method_call(definition, name, node)
      method   = definition.lookup(definition.method_call_type, name)
      current  = current_scope
      location = {
        :line   => node.line,
        :column => node.column,
        :file   => node.file
      }

      # Add the call to the current scope if we're dealing with a writable
      # method definition.
      if current.respond_to?(:calls) and !current.frozen?
        current.calls.push(
          MethodCallInfo.new(location.merge(:definition => method))
        )
      end

      # Add the caller to the called method, this allows for inverse lookups.
      unless method.frozen?
        method.callers.push(
          MethodCallInfo.new(location.merge(:definition => definition))
        )
      end
    end
401033
def stream(self):
		
		
		if 'init' not in self.flag:
			root = True
			self.prepare()
		else:
			root = False
		
		# Track which lines were generated in response to which lines of source code.
		# The end result is that there is one entry here for every line emitted, each integer representing the source
		# line number that triggered it.  If any lines are returned with missing line numbers, they're inferred from
		# the last entry already in the list.
		# Fun fact: this list is backwards; we optimize by using a deque and appending to the left edge. this updates
		# the head of a linked list; the whole thing needs to be reversed to make sense.
		mapping = self.mapping
		
		for line in self.input:
			handler = self.classify(line)
			
			if line.kind == 'code' and line.stripped == 'end':  # Exit the current child scope.
				return
			
			assert handler, "Unable to identify handler for line; this should be impossible!"
			
			self.input.push(line)  # Put it back so it can be consumed by the handler.
			
			for line in handler(self):  # This re-indents the code to match, if missing explicit scope.
				if root: mapping.appendleft(line.number or mapping[0])  # Track source line number.
				
				if line.scope is None:
					line = line.clone(scope=self.scope)
				
				yield line
311095
def visitParam_def(self, ctx:SystemRDLParser.Param_defContext):
        
        self.compiler.namespace.enter_scope()

        param_defs = []
        for elem in ctx.getTypedRuleContexts(SystemRDLParser.Param_def_elemContext):
            param_def = self.visit(elem)
            param_defs.append(param_def)

        self.compiler.namespace.exit_scope()
        return param_defs
816184
def visit_Call(self, node):
        
        func_aliases = self.aliases[node.func]
        if len(func_aliases) == 1:
            function_def = next(iter(func_aliases))
            if (isinstance(function_def, ast.FunctionDef) and
                    function_def.name in self.inlinable):
                self.update = True
                to_inline = copy.deepcopy(self.inlinable[function_def.name])
                arg_to_value = dict()
                values = node.args
                values += to_inline.args.defaults[len(node.args) -
                                                  len(to_inline.args.args):]
                for arg_fun, arg_call in zip(to_inline.args.args, values):
                    v_name = "__pythran_inline{}{}{}".format(function_def.name,
                                                             arg_fun.id,
                                                             self.call_count)
                    new_var = ast.Name(id=v_name,
                                       ctx=ast.Store(),
                                       annotation=None)
                    self.defs.append(ast.Assign(targets=[new_var],
                                                value=arg_call))
                    arg_to_value[arg_fun.id] = ast.Name(id=v_name,
                                                        ctx=ast.Load(),
                                                        annotation=None)
                self.call_count += 1
                return Inliner(arg_to_value).visit(to_inline.body[0])
        return node