1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-29 01:29:03 +02:00

meh lexer

This commit is contained in:
Pomax
2020-08-23 19:00:50 -07:00
parent 014dbe446f
commit 4f823cf856
55 changed files with 23577 additions and 5282 deletions

View File

@@ -1,9 +1,8 @@
import { GraphicsAPI } from "../api/graphics-api.js";
export default function performCodeSurgery(code) {
// 0. strip out block comments and whitespace
// 0. strip out superfluous whitespace
code = code.replace(/\\\*[\w\s\r\n]+?\*\\/, ``);
code = code.replace(/\r?\n(\r?\n)+/, `\n`);
// 1. ensure that anything that needs to run by first calling its super function, does so.