We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7da537c commit 0b0e20bCopy full SHA for 0b0e20b
utils/gyb_syntax_support/kinds.py
@@ -38,3 +38,18 @@ def lowercase_first_word(name):
38
if word_index == 0:
39
return name
40
return name[:word_index].lower() + name[word_index:]
41
+
42
43
+def syntax_buildable_child_type(type_name, syntax_kind, is_token,
44
+ is_optional=False):
45
+ if syntax_kind in SYNTAX_BASE_KINDS:
46
+ buildable_type = syntax_kind + 'Buildable'
47
+ elif not is_token:
48
+ buildable_type = syntax_kind
49
+ else:
50
+ buildable_type = type_name
51
52
+ if is_optional:
53
+ buildable_type += '?'
54
55
+ return buildable_type
0 commit comments