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
namespace A // создает локальный символ простанства имен для текущей ДЛЛ | |
{ | |
module B // создает локальный символ модуля для текущей ДЛЛ | |
{ | |
Main() : void // создает локальный символ метода для текущей ДЛЛ | |
{ | |
// порождает АСТ в котором возможен биндинг | |
Foo(); // вызов Foo из нэйспэйса A объявленного в другой сборке. | |
} | |
} |
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
using System.Console; | |
[Record] class A { public Foo : B { get; } } | |
[Record] class B { public Bar : int { get; } } | |
module Program | |
{ | |
Main() : void | |
{ | |
def obj1 : object = A(B(42)); |
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
using System.Console; | |
using System.Collections.Generic; | |
def dic = Dictionary(); | |
dic.Add("aaa", 123); | |
WriteLine(dic["aaa"]); | |
WriteLine(dic[42]); // error: dic has Dictionary[string, int] type |
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
// Nitra.Ast.TopAst | |
public override void EvalProperties(DependentPropertyEvalContext context) | |
{ | |
if ((this._N_bitField_51532 & 32) == 0) | |
{ | |
if (context.Stage >= 1) | |
{ | |
if (this.IsOpeningInEvaluated) | |
{ | |
this.OpeningOut = this.OpeningIn; |
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
------ Build started: Project: DotNetLang, Configuration: Debug Any CPU ------ | |
"C:\!\Nitra\.nuget\NuGet.exe" install "C:\!\Nitra\Nitra\DotNetLang\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\!\Nitra\ " | |
Restoring NuGet packages... | |
To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. | |
All packages listed in packages.config are already installed. | |
C:\Program Files (x86)\Nemerle\\Net-4.0\ncc.exe | |
/no-color | |
/no-stdlib | |
/greedy-references:- | |
/define:TRACE;DEBUG_EVAL_DEPENDENT_PROPERTIES;DEBUG |
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
Надо реализовать QualifiedReference.Aliased (сейчас там заглушечный код). | |
Нужно создать список глобальных псевдонимов. | |
Псевдонимы должны задаваться из свойств проекта или командной строки компилятора. | |
Каждый псевдоним может быть ассоциирован с одним деревом символов одной или более библиотеки (сборки). | |
Scope псевдонима должен содержать список корней деревьев символов для каждой сборки. | |
Предопределенный псевдоним global должен быть ассоциирован с корнем дерева символов проекта. | |
Для того чтобы сделать это, предварительно, нужно сделать отдельные иерархии символов для каждого проекта/сборки. | |
А дерево символов каждого проекта надо сделать сборным из деревьев подключенных к нему проектов/сборок. |
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
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Net; | |
using System.Web; | |
using System.Web.Mvc; | |
using BlackHoles.DataContexts; | |
using BlackHoles.Entities; |
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
using System.Console; | |
using Nemerle.Imperative.GoTo; // It need for 'goto' and 'label' macros. | |
struct S | |
{ | |
public mutable X : int; | |
public mutable Y : int; | |
} | |
module Program |
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
using System.Console; | |
struct S | |
{ | |
public mutable X : int; | |
public mutable Y : int; | |
} | |
module Program | |
{ |
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
syntax Node = Key=Reference sm NodeContent; | |
syntax NodeContent = "{" outline_begin_before inl NodeMembers nl d outline_end "}"; | |
syntax NodeMember | |
{ | |
| Attribute = Key=Reference sm ":" sm Value | |
| Node = Node | |
} | |
syntax Value | |
{ |