Files
wasmtime/lib/cretonne/meta/cdsl/__init__.py
Jakob Stoklund Olesen 19287c1f32 Split out operand descriptions.
- cdsl.operands has the Operand and OperandKind classes.
2016-11-08 10:58:23 -08:00

18 lines
366 B
Python

"""
Cretonne DSL classes.
This module defines the classes that are used to define Cretonne instructions
and other entitties.
"""
from __future__ import absolute_import
import re
camel_re = re.compile('(^|_)([a-z])')
def camel_case(s):
# type: (str) -> str
"""Convert the string s to CamelCase"""
return camel_re.sub(lambda m: m.group(2).upper(), s)