Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GPUTexture and GPUTextureView #26742

Merged
merged 2 commits into from Jun 2, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Improve webidl precision

Allow enum variants staring with digit
  • Loading branch information
kunalmohan committed Jun 1, 2020
commit d9db350df528628b1f7f2f1da711fc2da790ec49
@@ -4328,7 +4328,7 @@ def getEnumValueName(value):
if re.match("[^\x20-\x7E]", value):
raise SyntaxError('Enum value "' + value + '" contains non-ASCII characters')
if re.match("^[0-9]", value):
raise SyntaxError('Enum value "' + value + '" starts with a digit')
value = '_' + value
value = re.sub(r'[^0-9A-Za-z_]', '_', value)
if re.match("^_[A-Z]|__", value):
raise SyntaxError('Enum value "' + value + '" is reserved by the C++ spec')
@@ -4650,20 +4650,24 @@ def get_match(name):
# "object" is not distinguishable from other types
assert not object or not (interfaceObject or arrayObject or callbackObject or mozMapObject)
templateBody = CGList([], "\n")
if object:
templateBody.append(object)
if arrayObject or callbackObject:
# An object can be both an sequence object and a callback or
# dictionary, but we shouldn't have both in the union's members
# because they are not distinguishable.
assert not (arrayObject and callbackObject)
templateBody.append(arrayObject if arrayObject else callbackObject)
if interfaceObject:
assert not object
templateBody.append(interfaceObject)
if arrayObject:
templateBody.append(arrayObject)
if callbackObject:
templateBody.append(callbackObject)
elif object:
templateBody.append(object)
if mozMapObject:
templateBody.append(mozMapObject)

conversions.append(CGIfWrapper("value.get().is_object()", templateBody))

if dictionaryObject:
assert not hasObjectTypes
assert not object
conversions.append(dictionaryObject)

stringTypes = [t for t in memberTypes if t.isString() or t.isEnum()]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.