Everywhere: Add copyright and license header to all source files

This commit is contained in:
networkException 2023-01-22 14:45:39 +01:00
parent 0f3cd1a513
commit 3ee99a7d40
Signed by: networkException
GPG key ID: E3877443AE684391
25 changed files with 150 additions and 0 deletions

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Highlighter } from './html/highlighter.js';
import { Span } from './html/highlighter/span.js';
import { Tokenizer } from './html/tokenizer.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
// FIXME: Convert to const enum
export type ParseError = 'unexpected-null-character' |
'unexpected-question-mark-instead-of-tag-name' |

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Color } from './highlighter/properties/color.js';
import { Cursor } from './highlighter/properties/cursor.js';
import { Font } from './highlighter/properties/font.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
export abstract class Inspectable {
public abstract inspect(indent: number): string;
}

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Property } from '../property.js';
export class Color extends Property {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Property } from '../property.js';
export class Cursor extends Property {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Property } from '../property.js';
export class Font extends Property {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Property } from '../property.js';
export class Link extends Property {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Inspectable } from './inspectable.js';
export abstract class Property extends Inspectable {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Attribute } from '../tokenizer/attribute.js';
import { Position } from '../tokenizer/position.js';
import { Range } from '../tokenizer/range.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Color } from './highlighter/properties/color.js';
import { Span } from './highlighter/span.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { TODO, VERIFY, VERIFY_NOT_REACHED } from '../util/assertions.js';
import { CodePoints } from '../util/codePoints.js';
import { Constructor } from '../util/guards.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { VERIFY } from '../../util/assertions.js';
import { Inspectable } from '../highlighter/inspectable.js';
import { Position } from './position.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
// Taken from https://html.spec.whatwg.org/entities.json
// See also: https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Inspectable } from '../highlighter/inspectable.js';
export class Position extends Inspectable {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Position } from './position.js';
export type Range = {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
export const enum State {
Data = 'Data',
RCDATA = 'RCDATA',

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Inspectable } from '../highlighter/inspectable.js';
import { Position } from './position.js';
import { Range } from './range.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { REPLACEMENT_CHARACTER, Token, Type } from '../token.js';
export class CharacterToken extends Token {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Token, Type, REPLACEMENT_CHARACTER } from '../token.js';
export class CommentToken extends Token {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { VERIFY } from '../../../util/assertions.js';
import { Token, Type, REPLACEMENT_CHARACTER } from '../token.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Token, Type } from '../token.js';
export class EndOfFileToken extends Token {

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { AttributeList } from '../attribute.js';
import { Token, Type, REPLACEMENT_CHARACTER } from '../token.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { AttributeList } from '../attribute.js';
import { Token, Type, REPLACEMENT_CHARACTER } from '../token.js';

View file

@ -1,3 +1,9 @@
/*
* Copyright (c) 2023, networkException <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import { Color } from './html/highlighter/properties/color.js';
import { Property } from './html/highlighter/property.js';
import { Span } from './html/highlighter/span.js';