OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 argument += singleCharacterEscapes.get(character) || character; | 122 argument += singleCharacterEscapes.get(character) || character; |
123 } | 123 } |
124 else if (character == "\\") | 124 else if (character == "\\") |
125 { | 125 { |
126 escape = true; | 126 escape = true; |
127 } | 127 } |
128 else if (character == "'") | 128 else if (character == "'") |
129 { | 129 { |
130 withinQuotes = !withinQuotes; | 130 withinQuotes = !withinQuotes; |
131 } | 131 } |
132 else if (withinQuotes || character != ";" && !/\s/u.test(character)) | 132 else if (withinQuotes || character != ";" && !/\s/.test(character)) |
133 { | 133 { |
134 argument += character; | 134 argument += character; |
135 } | 135 } |
136 else | 136 else |
137 { | 137 { |
138 if (argument) | 138 if (argument) |
139 { | 139 { |
140 call.push(argument); | 140 call.push(argument); |
141 argument = ""; | 141 argument = ""; |
142 } | 142 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 let value = imports[name]; | 180 let value = imports[name]; |
181 if (typeof value == "function") | 181 if (typeof value == "function") |
182 value(...args); | 182 value(...args); |
183 } | 183 } |
184 } | 184 } |
185 } | 185 } |
186 `; | 186 `; |
187 } | 187 } |
188 | 188 |
189 exports.compileScript = compileScript; | 189 exports.compileScript = compileScript; |
OLD | NEW |