# 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, 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", "column", "counters", "effects", "font", "inherited_box", "inherited_svg", "inherited_table", "inherited_text", "inherited_ui", "list", "margin", "outline", "page", "padding", "position", "svg", "table", "text", "ui", "xul", ] def main(): usage = ( "Usage: %s [ servo-2013 | servo-2020 | gecko ] [ style-crate | geckolib