Skip to content

Commit 61015eb

Browse files
committed
package 12.05.22
1 parent afd1806 commit 61015eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+4628
-188
lines changed

CHANGELOG.md

Lines changed: 540 additions & 0 deletions
Large diffs are not rendered by default.

ace-modules.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ declare module 'ace-builds/src-noconflict/mode-assembly_x86';
4141
declare module 'ace-builds/src-noconflict/mode-autohotkey';
4242
declare module 'ace-builds/src-noconflict/mode-batchfile';
4343
declare module 'ace-builds/src-noconflict/mode-c9search';
44+
declare module 'ace-builds/src-noconflict/mode-c_cpp';
4445
declare module 'ace-builds/src-noconflict/mode-cirru';
4546
declare module 'ace-builds/src-noconflict/mode-clojure';
4647
declare module 'ace-builds/src-noconflict/mode-cobol';
@@ -54,7 +55,6 @@ declare module 'ace-builds/src-noconflict/mode-csound_score';
5455
declare module 'ace-builds/src-noconflict/mode-csp';
5556
declare module 'ace-builds/src-noconflict/mode-css';
5657
declare module 'ace-builds/src-noconflict/mode-curly';
57-
declare module 'ace-builds/src-noconflict/mode-c_cpp';
5858
declare module 'ace-builds/src-noconflict/mode-d';
5959
declare module 'ace-builds/src-noconflict/mode-dart';
6060
declare module 'ace-builds/src-noconflict/mode-diff';
@@ -222,8 +222,8 @@ declare module 'ace-builds/src-noconflict/theme-kr_theme';
222222
declare module 'ace-builds/src-noconflict/theme-kuroir';
223223
declare module 'ace-builds/src-noconflict/theme-merbivore';
224224
declare module 'ace-builds/src-noconflict/theme-merbivore_soft';
225-
declare module 'ace-builds/src-noconflict/theme-monokai';
226225
declare module 'ace-builds/src-noconflict/theme-mono_industrial';
226+
declare module 'ace-builds/src-noconflict/theme-monokai';
227227
declare module 'ace-builds/src-noconflict/theme-nord_dark';
228228
declare module 'ace-builds/src-noconflict/theme-one_dark';
229229
declare module 'ace-builds/src-noconflict/theme-pastel_on_dark';
@@ -255,6 +255,7 @@ declare module 'ace-builds/src-noconflict/snippets/assembly_x86';
255255
declare module 'ace-builds/src-noconflict/snippets/autohotkey';
256256
declare module 'ace-builds/src-noconflict/snippets/batchfile';
257257
declare module 'ace-builds/src-noconflict/snippets/c9search';
258+
declare module 'ace-builds/src-noconflict/snippets/c_cpp';
258259
declare module 'ace-builds/src-noconflict/snippets/cirru';
259260
declare module 'ace-builds/src-noconflict/snippets/clojure';
260261
declare module 'ace-builds/src-noconflict/snippets/cobol';
@@ -268,7 +269,6 @@ declare module 'ace-builds/src-noconflict/snippets/csound_score';
268269
declare module 'ace-builds/src-noconflict/snippets/csp';
269270
declare module 'ace-builds/src-noconflict/snippets/css';
270271
declare module 'ace-builds/src-noconflict/snippets/curly';
271-
declare module 'ace-builds/src-noconflict/snippets/c_cpp';
272272
declare module 'ace-builds/src-noconflict/snippets/d';
273273
declare module 'ace-builds/src-noconflict/snippets/dart';
274274
declare module 'ace-builds/src-noconflict/snippets/diff';

ace.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ export namespace Ace {
757757
setStyle(style: string): void;
758758
unsetStyle(style: string): void;
759759
getFontSize(): string;
760-
setFontSize(size: string): void;
760+
setFontSize(size: number): void;
761761
focus(): void;
762762
isFocused(): boolean;
763763
blur(): void;

demo/kitchen-sink/demo.js

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,7 @@ var supportedModes = {
17801780
HTML_Ruby: ["erb|rhtml|html.erb"],
17811781
INI: ["ini|conf|cfg|prefs"],
17821782
Io: ["io"],
1783+
Ion: ["ion"],
17831784
Jack: ["jack"],
17841785
Jade: ["jade|pug"],
17851786
Java: ["java"],
@@ -1821,11 +1822,12 @@ var supportedModes = {
18211822
Nunjucks: ["nunjucks|nunjs|nj|njk"],
18221823
ObjectiveC: ["m|mm"],
18231824
OCaml: ["ml|mli"],
1825+
PartiQL: ["partiql|pql"],
18241826
Pascal: ["pas|p"],
18251827
Perl: ["pl|pm"],
18261828
pgSQL: ["pgsql"],
1827-
PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
18281829
PHP_Laravel_blade: ["blade.php"],
1830+
PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
18291831
Pig: ["pig"],
18301832
Powershell: ["ps1"],
18311833
Praat: ["praat|praatscript|psc|proc"],
@@ -1845,6 +1847,7 @@ var supportedModes = {
18451847
RST: ["rst"],
18461848
Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
18471849
Rust: ["rs"],
1850+
SaC: ["sac"],
18481851
SASS: ["sass"],
18491852
SCAD: ["scad"],
18501853
Scala: ["scala|sbt"],
@@ -6831,6 +6834,15 @@ var keyWordCompleter = {
68316834
}
68326835
};
68336836

6837+
var transformSnippetTooltip = function(str) {
6838+
var record = {};
6839+
return str.replace(/\${(\d+)(:(.*?))?}/g, function(_, p1, p2, p3) {
6840+
return (record[p1] = p3 || '');
6841+
}).replace(/\$(\d+?)/g, function (_, p1) {
6842+
return record[p1];
6843+
});
6844+
};
6845+
68346846
var snippetCompleter = {
68356847
getCompletions: function(editor, session, pos, prefix, callback) {
68366848
var scopes = [];
@@ -6863,7 +6875,7 @@ var snippetCompleter = {
68636875
if (item.type == "snippet" && !item.docHTML) {
68646876
item.docHTML = [
68656877
"<b>", lang.escapeHTML(item.caption), "</b>", "<hr></hr>",
6866-
lang.escapeHTML(item.snippet)
6878+
lang.escapeHTML(transformSnippetTooltip(item.snippet))
68676879
].join("");
68686880
}
68696881
}
@@ -6994,12 +7006,17 @@ function is(token, type) {
69947006
exports.singletonTags = ["area", "base", "br", "col", "command", "embed", "hr", "html", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"];
69957007
exports.blockTags = ["article", "aside", "blockquote", "body", "div", "dl", "fieldset", "footer", "form", "head", "header", "html", "nav", "ol", "p", "script", "section", "style", "table", "tbody", "tfoot", "thead", "ul"];
69967008

7009+
exports.formatOptions = {
7010+
lineBreaksAfterCommasInCurlyBlock: true
7011+
};
7012+
69977013
exports.beautify = function(session) {
69987014
var iterator = new TokenIterator(session, 0, 0);
69997015
var token = iterator.getCurrentToken();
70007016
var tabString = session.getTabString();
70017017
var singletonTags = exports.singletonTags;
70027018
var blockTags = exports.blockTags;
7019+
var formatOptions = exports.formatOptions || {};
70037020
var nextToken;
70047021
var breakBefore = false;
70057022
var spaceBefore = false;
@@ -7181,7 +7198,7 @@ exports.beautify = function(session) {
71817198
} else if (token.type === "punctuation.operator" && value.match(/^(:|,)$/)) {
71827199
trimCode();
71837200
trimNext();
7184-
if (value.match(/^(,)$/) && curlyDepth>0 && roundDepth===0) {
7201+
if (value.match(/^(,)$/) && curlyDepth>0 && roundDepth===0 && formatOptions.lineBreaksAfterCommasInCurlyBlock) {
71857202
rowsToAdd++;
71867203
} else {
71877204
spaceAfter = true;
@@ -7288,14 +7305,18 @@ exports.beautify = function(session) {
72887305
else
72897306
rowsToAdd = 1;
72907307
}
7291-
if (is(token, "tag-open") && value === "</") {
7292-
depth--;
7293-
} else if (is(token, "tag-open") && value === "<" && singletonTags.indexOf(nextToken.value) === -1) {
7294-
depth++;
7295-
} else if (is(token, "tag-name")) {
7308+
if (nextToken && singletonTags.indexOf(nextToken.value) === -1) {
7309+
if (is(token, "tag-open") && value === "</") {
7310+
depth--;
7311+
} else if (is(token, "tag-open") && value === "<") {
7312+
depth++;
7313+
} else if (is(token, "tag-close") && value === "/>"){
7314+
depth--;
7315+
}
7316+
}
7317+
7318+
if (is(token, "tag-name")) {
72967319
tagName = value;
7297-
} else if (is(token, "tag-close") && value === "/>" && singletonTags.indexOf(tagName) === -1){
7298-
depth--;
72997320
}
73007321

73017322
row = curRow;

demo/kitchen-sink/docs/ion.ion

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Comment
2+
/*
3+
Multi
4+
Line
5+
Comment
6+
*/
7+
[1,2,3,45 /*TODO: should be 42, obviously*/, 2016-04-21T08:10:46Z, 2016-04-21T08:10:46-08:00, 2016-04-21, 2016, 0x5, 0b0110]
8+
(5 7 1 3 [
9+
'a', 'b',
10+
null, null.int, null.bool, null.list
11+
true, false,
12+
nan, -inf, +inf,
13+
"str",
14+
"str with embedded \" ",
15+
'''str with embedded \''' ''',
16+
{{"clob content"}},
17+
{{ AB/ }}
18+
])
19+
20+
'''
21+
22+
multi
23+
line
24+
string
25+
26+
'''
27+
28+
states::{
29+
// https://amzn.github.io/ion-docs/docs/spec.html
30+
root: rules::[
31+
include::'value'
32+
],
33+
34+
// https://amzn.github.io/ion-docs/docs/spec.html#string
35+
string: rules::[
36+
match::{
37+
regex: "(\\\")((?:\\\\\"|[^\"])*)(\\\")",
38+
token: ['string.dblq.punc.start', 'string.dblq', 'string.dblq.punc.end']
39+
},
40+
push::{
41+
regex: "\'{3}",
42+
token: 'string.trpq.punc.start',
43+
states: rules::[
44+
pop::{
45+
regex: "\'{3}",
46+
token: 'string.trpq.punc.end',
47+
},
48+
match::{
49+
regex: "(?:\\\\'*|.|[^']*)",
50+
token: 'string.trpq'
51+
}
52+
]
53+
},
54+
],
55+
56+
/*
57+
...
58+
*/
59+
}
60+
{
61+
"json": {
62+
"compatibility": true,
63+
"open sourced": "2016-04-21T08:10:46Z",
64+
"foo": 9,
65+
"bar": 1.1,
66+
"baz": [{"id": 1}, {"id":2}]
67+
}
68+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
-- comment
2+
/* multi
3+
line
4+
comment */
5+
6+
SELECT a, b, c FROM stuff s INNER CROSS JOIN @s WHERE f(s) -- comment
7+
-- comment
8+
SELECT "a", b FROM stuff s, @s WHERE f(s)
9+
10+
SELECT VALUE {'sensor': s.sensor,
11+
'readings': (SELECT VALUE l.co
12+
FROM logs as l
13+
WHERE l.sensor = s.sensor
14+
)
15+
}
16+
FROM sensors AS s
17+
18+
SELECT VALUE (PIVOT v AT g
19+
FROM UNPIVOT r as v At g
20+
WHERE g LIKE 'co%')
21+
FROM sensors AS r
22+
23+
24+
SELECT x.*
25+
FROM [{'a':1, 'b':1}, {'a':2}, 'foo'] AS x
26+
27+
-- NOTE: the embedded ion values parse as ion (inside the backticks "`")
28+
SELECT x.*
29+
FROM `[{'a':1, 'b':1}, {'a':2}, "foo"]` AS x
30+
31+
SELECT VALUE {v.a: v.b, v.c: v.d}
32+
FROM <<{'a':'same', 'b':1, 'c':'same', 'd':2}>> AS v
33+
34+
SELECT u.id, feedbackId, commentId, upvoteId
35+
FROM users as u, u.feedbacks as feedback at feedbackId
36+
LEFT CROSS JOIN feedback.comments as comment AT commentId
37+
LEFT CROSS JOIN UNPIVOT comment.upvotes as upvote at upvoteId
38+
39+
40+
SELECT (
41+
SELECT numRec, tabulated
42+
FROM committed.changes changes,
43+
(SELECT u.id, feedbackId, commentId, upvoteId
44+
FROM changes.tabulated as u,
45+
u.feedbacks as feedback at feedbackId LEFT CROSS JOIN feedback.comments as comment AT commentId
46+
LEFT CROSS JOIN UNPIVOT comment.upvotes as upvote at upvoteId
47+
) as tabulated,
48+
changes.numRec as numRec
49+
)
50+
AS changes
51+
FROM incoming_committed committed
52+
53+
SELECT SUM(AVG(n)) FROM <<numbers, numbers>> AS n
54+
55+
SELECT VALUES v.a
56+
FROM [{'a':1, 'b':true}, {'a':2, 'b':null}, {'a':3}] v
57+
WHERE v.b
58+
59+
SELECT attributeId, COUNT(*) as the_count
60+
FROM repeating_things
61+
GROUP BY attributeId GROUP AS g
62+
HAVING 1 = 0

demo/kitchen-sink/docs/php_laravel_blade.blade.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,18 @@
6565
@yield('content')
6666
</div>
6767
</body>
68-
</html>
68+
</html>
69+
70+
71+
{{-- comment --}}
72+
73+
@if (
74+
{{-- comment --}}
75+
/*block comment*/
76+
#another comment
77+
$user->type == 1
78+
// c comment
79+
/* comment*/
80+
)
81+
# not a comment <div id="#//x"></div>
82+
@endif

demo/kitchen-sink/docs/sac.sac

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*****************************************************************************
2+
*
3+
* SAC demo program
4+
*
5+
* This SAC demo program implements 2-dimensional relaxation on double
6+
* precision floating point numbers applying a 4-point stencil and fixed
7+
* boundary conditions.
8+
*
9+
* The vertical (SIZE1) and the horizontal (SIZE2) array size as well as
10+
* the number of iterations to be performed (LOOP) may be set at compile
11+
* time.
12+
*
13+
*****************************************************************************/
14+
15+
#ifndef LOOP
16+
#define LOOP 100
17+
#endif
18+
19+
#ifndef SIZE1
20+
#define SIZE1 1000
21+
#endif
22+
23+
#ifndef SIZE2
24+
#define SIZE2 1000
25+
#endif
26+
27+
use Array: all;
28+
use StdIO: all;
29+
30+
inline
31+
double[+] onestep(double[+] B)
32+
{
33+
A = with {
34+
( . < x < . ) : 0.25*(B[x+[1,0]]
35+
+ B[x-[1,0]]
36+
+ B[x+[0,1]]
37+
+ B[x-[0,1]]);
38+
} : modarray( B );
39+
40+
return(A);
41+
}
42+
43+
inline
44+
double[+] relax(double[+] A, int steps)
45+
{
46+
for (k=0; k<steps; k++) {
47+
A = onestep(A);
48+
}
49+
50+
return(A);
51+
}
52+
53+
int main ()
54+
{
55+
A = with {
56+
( . <= x <= . ) : 0.0d;
57+
} : genarray( [SIZE1,SIZE2] );
58+
59+
A = modarray(A, [0,1], 500.0d);
60+
A = relax( A, LOOP);
61+
62+
z = with {
63+
( 0*shape(A) <= x < shape(A) ) : A[x];
64+
} : fold( +, 0d );
65+
66+
#if 0
67+
printf("%.10g\n", z);
68+
return(0);
69+
#else
70+
print( z);
71+
return( 0);
72+
#endif
73+
}
74+
75+

kitchen-sink.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="author" content="Fabian Jakobs">
99
<!--
1010
Ace
11-
version 1.4.14
11+
version 1.5.0
1212
commit
1313
-->
1414

0 commit comments

Comments
 (0)