Собственно чему будем учить:
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
{-# LANGUAGE LambdaCase #-} | |
module Main where | |
program = drawingOf(codeWorldLogo) | |
testLayout1 = l1 +1 | |
-- Open 2 nested contexts | |
where l1 = l2 + l3 | |
l2 = 2 |
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
<html> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="content-type"> | |
</head> | |
<body> | |
<div> | |
Input: | |
<textarea id="in" name="input" cols="40" rows="3""></textarea> | |
<button onclick="lex()"> Parse </button> | |
</div> |
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
<html> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="content-type"> | |
</head> | |
<body> | |
<script type="text/javascript" src="./moo.js"> </script> | |
<script type="text/javascript"> | |
const lexer = moo.compile({ | |
plus: "+", |
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
program = drawingOf(codeWorldLogo) | |
testIndent i = t1 i | |
where t1 i = 2 + t2 i | |
where t2 i = (t3 i) ** 2 | |
where t3 i = i - 3 | |
testIndent 0 = 5 | |
pic1,pic2 :: Picture |