-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
cdent.scroll
43 lines (39 loc) · 1.25 KB
/
cdent.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import ../code/conceptPage.scroll
id cdent
name C'Dent
appeared 2010
creators Ingy döt Net
tags ir
website http://cdent.org/
conceptDescription When you write a module in C'Dent, you can use it in a dozen different programming languages. For instance, you could write a module in Python and use it in JavaScript, or you could write a module in JavaScript and use it in Perl 6, Ruby or Java. C'Dent has multiple input syntaxes. These syntaxes are strict subsets of common and popular object-oriented programming languages. The current implementation of C'Dent supports Python, JavaScript and Perl 6 inputs. Perl and Ruby will be added soon. C'Dent parses and analyzes the input into a well defined tree structure that is is known as C'Dent. The C'Dent format can be trivially serialized to disk as YAML or XML.
example
%TAG ! tag:cdent.org,2010:
--- !AST
has:
- !Module
has:
- !Comment
line: 1
type: doc
val: 'This is World class :)
'
- !Comment
line: 4
type: blank
val: '
'
- !Class
has:
- !Method
has:
- !Println
args:
- !String
val: Hello, world
line: 7
line: 6
name: greet
line: 5
name: World
line: 1
name: Module