MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / split_arguments

Method split_arguments

build_scripts/pybind11_stubgen.py:204–224  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

202 return hash((self.name, self.args, self.rtype))
203
204 def split_arguments(self):
205 if len(self.args.strip()) == 0:
206 return []
207
208 prev_stop = 0
209 brackets = 0
210 splitted_args = []
211
212 for i, c in enumerate(self.args):
213 if c == "[":
214 brackets += 1
215 elif c == "]":
216 brackets -= 1
217 assert brackets >= 0
218 elif c == "," and brackets == 0:
219 splitted_args.append(self.args[prev_stop:i])
220 prev_stop = i + 1
221
222 splitted_args.append(self.args[prev_stop:])
223 assert brackets == 0
224 return splitted_args
225
226 @staticmethod
227 def argument_type(arg):

Callers 3

setter_arg_typeMethod · 0.80
to_linesMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected