File indexing completed on 2024-05-19 04:42:04
0001 #!/usr/bin/env python3 0002 # -*- coding: utf-8 -*- 0003 # 0004 # SPDX-FileCopyrightText: 2014 Denis Steckelmacher <steckdenis@yahoo.fr> 0005 # 0006 # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 0008 from jsgenerator import * 0009 from common import * 0010 0011 # Print the license of the generated file (the same as the one of this file) 0012 license() 0013 basicTypes(globals()) 0014 0015 _object = 'new Object()' 0016 _function = 'function(){}' 0017 0018 Module().members( 0019 F(_string, 'format', ('format', _string), ('args', _mixed)), 0020 F(_void, 'debug', ('string', _string)), 0021 F(_void, 'error', ('string', _string)), 0022 F(_void, 'puts', ('string', _string)), 0023 F(_void, 'print', ('string', _string)), 0024 F(_void, 'log', ('string', _string)), 0025 F(_string, 'inspect', ('object', _object), ('options', _object)), 0026 F(_bool, 'isArray', ('object', _array)), 0027 F(_bool, 'isRegExp', ('object', 'new RegExp()')), 0028 F(_bool, 'isDate', ('object', 'new Date()')), 0029 F(_bool, 'isError', ('object', 'new Error()')), 0030 F(_void, 'inherits', ('constructor', _function), ('superConstructor', _function)) 0031 ).print()