diff options
Diffstat (limited to 'syntax/def_NEWLINE.py')
| -rwxr-xr-x | syntax/def_NEWLINE.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/syntax/def_NEWLINE.py b/syntax/def_NEWLINE.py new file mode 100755 index 0000000..2720bee --- /dev/null +++ b/syntax/def_NEWLINE.py @@ -0,0 +1,17 @@ +#!/usr/bin/python3 + +# Copyright 2025, Jonas Smedegaard <dr@jones.dk> +# SPDX-License-Identifier: GPL-3+ + +from os.path import basename, splitext +from railroad import * + +Diagram( + Choice(0, + '\\r\\n', + '\\n', + '\\r', + ), + type="complex" +).writeStandalone( + open(splitext(basename(__file__))[0] + ".svg", "w").write) |
