This file contains hidden or 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
{"jclosure_jsproxybridge":"function() {\n return {\n \"emptyObject\": function () {\n return new Object();\n },\n \"emptyArray\": function () {\n return new Array();\n },\n \"getGlobal\": function () {\n return window;\n },\n \"construct0\": function (constructor) {\n return new constructor();\n },\n \"construct1\": function (constructor, arg1) {\n return new constructor(arg1);\n },\n \"construct2\": function (constructor, arg1, arg2) {\n return new constructor(arg1, arg2);\n },\n \"construct3\": function (constructor, arg1, arg2, arg3) {\n return new constructor(arg1, arg2, arg3);\n },\n \"applyFunction\": function (object, args) {\n return object.apply(null, args);\n },\n \"callMethod\": function (object, name, args) {\n return object[name].apply(object, args);\n },\n \"callMethod0\": function (object, name) {\n return object[name]();\n },\n \"callMethod1\": function (object, name, arg1) {\n |
This file contains hidden or 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
enum DataType | |
{ | |
None(false, BASE_OPERATOR_TITLE_MAP), // Null or nil is this language. | |
Boolean(false, BASE_OPERATOR_TITLE_MAP), | |
Number(false, BASE_OPERATOR_TITLE_MAP), | |
String(false, BASE_OPERATOR_TITLE_MAP), | |
Date(false, BASE_OPERATOR_TITLE_MAP), | |
StringArray(true, BASE_OPERATOR_TITLE_MAP), // An array of strings | |
Object(false, BASE_OPERATOR_TITLE_MAP), // A catch-all type for objects types. | |
DateTime(false, BASE_OPERATOR_TITLE_MAP), |
This file contains hidden or 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
class Foo<T> | |
{ | |
late T value; | |
} | |
void main() { | |
Foo<Object?> foo1 = new Foo<String>(); | |
Foo<Object?> foo2 = new Foo<int>(); |
This file contains hidden or 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
% dart compile js web/main.dart -o /dev/stdout --no-source-maps | |
Almost works, but at the end there is an error: | |
if (typeof dartMainRunner === "function") | |
dartMainRunner(callMain, []); | |
else | |
callMain([]); | |
}); | |
})(); | |
The compiler crashed: FileSystemException: Cannot create file, path = '/dev/stdout.deps' (OS Error: Operation not permitted, errno = 1) |
This file contains hidden or 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
targets: | |
$default: | |
sources: | |
- lib/** | |
- web/** | |
# Note that it is important to include these in the default target. | |
- pubspec.* | |
- $package$ | |
builders: | |
# ----------------------- |
This file contains hidden or 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
abstract class IVisitor<R> { | |
// visitX() methods not declared here, but | |
// on implementing class, so we can add new node types, | |
// without coupling the code calling accept() to that knowledge. | |
} | |
abstract class NodeVisitor<R> implements IVisitor<R> { | |
R visitParen(Node token); | |
} |
This file contains hidden or 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
targets: | |
$default: | |
sources: | |
- lib/** | |
- web/** | |
# Note that it is important to include these in the default target. | |
- pubspec.* | |
- $package$ | |
builders: | |
# ----------------------- |
This file contains hidden or 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
abstract class IDataType | |
{ | |
void render(); | |
} | |
class StringDataType implements IDataType | |
{ | |
@override | |
void render() |
This file contains hidden or 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
class Property | |
{ | |
final String foo; | |
const Property(String this.foo); | |
} | |
const Property MARGIN = const Property("margin"); | |
const Property PADDING = const Property("padding"); |
This file contains hidden or 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
class LayoutBox { } | |
class RgbColour { } | |
class LayoutProperty<T> | |
{ | |
static final LayoutProperty<LayoutBox> margin = new LayoutProperty<LayoutBox>(); | |
static final LayoutProperty<RgbColour> colour = new LayoutProperty<RgbColour>(); |
NewerOlder