# 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 http://mozilla.org/MPL/2.0/.
from mozfile import json
def lookup_token(tokens, value):
keys = value.split(".")
key = keys[-1] for subkey in keys[:-1]:
tokens = tokens[subkey] ifnot tokens: break ifnot tokens or key notin tokens: raise ValueError(f"Token not found: {value}") return tokens[key]
def process_colors(colors, tokens): for key, value in colors.items(): if value.startswith("."):
colors[key] = lookup_token(tokens, value[1:])
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.