parent
ac60fc50bf
commit
eb37e35997
8 changed files with 150 additions and 0 deletions
19
core/node.ts
19
core/node.ts
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Nilable } from "./utils.ts";
|
||||
|
||||
export type Attrs = Record<string, AttrVal>;
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export function concat(arr: Skipable<string>[]): string {
|
||||
return join("", arr);
|
||||
}
|
||||
|
|
19
par/md.ts
19
par/md.ts
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { AnyNode, Elem, Fragment, TextNode } from "../core/node.ts";
|
||||
import { isNil, Nilable } from "../core/utils.ts";
|
||||
import { Parser } from "./types.ts";
|
||||
|
|
18
par/types.ts
18
par/types.ts
|
@ -1,3 +1,21 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { AnyNode } from "../core/node.ts";
|
||||
|
||||
export interface Parser {
|
||||
|
|
18
ren/attrs.ts
18
ren/attrs.ts
|
@ -1,3 +1,21 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { Attrs } from "../core/node.ts";
|
||||
import { isNotSkip, isStr, join, Skipable } from "../core/utils.ts";
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
AnyNode,
|
||||
AttrEntry,
|
||||
|
|
19
ren/node.ts
19
ren/node.ts
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from "../core/node.ts";
|
||||
|
||||
import {
|
||||
|
|
19
ren/types.ts
19
ren/types.ts
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
*
|
||||
* This file is part of Paren
|
||||
*
|
||||
* Paren is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Paren is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Paren. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { AnyNode } from "../core/node.ts";
|
||||
|
||||
export interface Renderer<T> {
|
||||
|
|
Reference in a new issue