mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Add initial website pages
This commit is contained in:
parent
f2b9092438
commit
99bc54b159
55 changed files with 13029 additions and 1 deletions
28
website/index/samples/sample.coffeescript.txt
Normal file
28
website/index/samples/sample.coffeescript.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"""
|
||||
A CoffeeScript sample.
|
||||
"""
|
||||
|
||||
class Vehicle
|
||||
constructor: (@name) =>
|
||||
|
||||
drive: () =>
|
||||
alert "Conducting #{@name}"
|
||||
|
||||
class Car extends Vehicle
|
||||
drive: () =>
|
||||
alert "Driving #{@name}"
|
||||
|
||||
c = new Car "Brandie"
|
||||
|
||||
while notAtDestination()
|
||||
c.drive()
|
||||
|
||||
raceVehicles = (new Car for i in [1..100])
|
||||
|
||||
startRace = (vehicles) -> [vehicle.drive() for vehicle in vehicles]
|
||||
|
||||
fancyRegExp = ///
|
||||
(\d+) # numbers
|
||||
(\w*) # letters
|
||||
$ # the end
|
||||
///
|
||||
Loading…
Add table
Add a link
Reference in a new issue