# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. import json import os.path import re import sys BASE = os.path.dirname(__file__.replace('\\', '/')) sys.path.insert(0, os.path.join(BASE, "Mako-0.9.1.zip")) sys.path.insert(0, BASE) # For importing `data.py` from mako import exceptions from mako.lookup import TemplateLookup from mako.template import Template import data RE_PYTHON_ADDR = re.compile(r'<.+? object at 0x[0-9a-fA-F]+>') OUT_DIR = os.environ.get("OUT_DIR", "") STYLE_STRUCT_LIST = [ "background", "border", "box", "color", "column", "counters", "effects", "font", "inherited_box", "inherited_table", "inherited_text", "inherited_ui", "inherited_svg", "list", "margin", "outline", "padding", "position", "table", "text", "ui", "svg", "xul", ] def main(): usage = ("Usage: %s [ servo | gecko ] [ style-crate | geckolib