forked from ajaxorg/ace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes ajaxorg#2932 variable cast in typescript mode is highlighted as…
… jsx
- Loading branch information
Showing
9 changed files
with
110 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Cloud9 Rocks!</title> | ||
</head> | ||
<body> | ||
|
||
<table class="table"> | ||
<tr> | ||
<th>Name</th> | ||
<th>Size</th> | ||
</tr> | ||
<% if (!isRoot) { %> | ||
<tr> | ||
<td><a href="..">..</a></td> | ||
<td></td></td> | ||
</tr> | ||
<% } %> | ||
<% entries.forEach(function(entry) { %> | ||
<tr> | ||
<td> | ||
<span class="glyphicon <%= entry.mime == 'directory' ? 'folder': 'file'%>"></span> | ||
<a href="<%= entry.name %>"><%= entry.name %></a> | ||
</td> | ||
<td><%= entry.size %></td> | ||
</tr> | ||
<% }) %> | ||
</table> | ||
<input placeholder="Username or email" | ||
<% | ||
if (typeof window != 'undefined') { | ||
%> | ||
value="<%=window%>" | ||
<% | ||
} | ||
%> | ||
/> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use core::rand::RngUtil; | ||
|
||
fn main() { | ||
for ["Alice", "Bob", "Carol"].each |&name| { | ||
do spawn { | ||
let v = rand::Rng().shuffle([1, 2, 3]); | ||
for v.each |&num| { | ||
print(fmt!("%s says: '%d'\n", name, num + 1)) | ||
} | ||
} | ||
} | ||
} | ||
|
||
/* nested /* | ||
comments */ */ | ||
|
||
fn map<T, U>(vector: &[T], function: &fn(v: &T) -> U) -> ~[U] { | ||
let mut accumulator = ~[]; | ||
for vec::each(vector) |element| { | ||
accumulator.push(function(element)); | ||
} | ||
return accumulator; | ||
} | ||
|
||
|
||
// numbers | ||
14E-111_f64; 45isize 0x1i32 0o777u32 0b01 14f32 1_2.78f32 1_2.3E+7f32 | ||
|
||
// not numbers | ||
14._E-111_f64; 0xi32 0b777u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[[ | ||
["jsx",1], | ||
["storage.type","var"], | ||
["text"," "], | ||
["identifier","mode"], | ||
["text"," "], | ||
["keyword.operator","="], | ||
["text"," "], | ||
["meta.tag.punctuation.tag-open.xml","<"], | ||
["meta.tag.tag-name.xml","div"], | ||
["meta.tag.punctuation.tag-close.xml",">"], | ||
["string"," "] | ||
],[ | ||
["jsx",1], | ||
["string"," Typescript + "], | ||
["meta.tag.punctuation.tag-open.xml","<"], | ||
["meta.tag.tag-name.xml","b"], | ||
["meta.tag.punctuation.tag-close.xml",">"], | ||
["string"," JSX "], | ||
["meta.tag.punctuation.end-tag-open.xml","</"], | ||
["meta.tag.tag-name.xml","b"], | ||
["meta.tag.punctuation.tag-close.xml",">"], | ||
["string"," "] | ||
],[ | ||
"start", | ||
["meta.tag.punctuation.end-tag-open.xml","</"], | ||
["meta.tag.tag-name.xml","div"], | ||
["meta.tag.punctuation.tag-close.xml",">"], | ||
["punctuation.operator",";"] | ||
]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters