Skip to content
Permalink
Browse files

ABC/NN updates

  • Loading branch information...
shanebdavis committed Jun 24, 2019
1 parent a0d5f98 commit d4569451a600697694a93a6bd7e93a5f8bb28f28
Showing with 427 additions and 317 deletions.
  1. +62 −0 TODO-SCRATCH.md
  2. +1 −2 cafInCaf/CaffeineScript/SemanticTree/TransformOnlyStns/ComprehensionStn.caf
  3. +0 −1 cafInCaf/CaffeineScript/StandardImport.caf
  4. +1 −1 editors/CaffeineScript.sublime-syntax
  5. +3 −3 package.json
  6. +0 −8 perf/Perfs/index.coffee
  7. +9 −0 perf/Perfs/index.js
  8. +0 −5 perf/Perfs/namespace.coffee
  9. +8 −0 perf/Perfs/namespace.js
  10. +0 −32 source/CaffeineScript/Rules/index.coffee
  11. +33 −0 source/CaffeineScript/Rules/index.js
  12. +0 −4 source/CaffeineScript/Rules/namespace.coffee
  13. +7 −0 source/CaffeineScript/Rules/namespace.js
  14. +0 −8 source/CaffeineScript/SemanticTree/PlaceholderStns/index.coffee
  15. +9 −0 source/CaffeineScript/SemanticTree/PlaceholderStns/index.js
  16. +0 −4 source/CaffeineScript/SemanticTree/PlaceholderStns/namespace.coffee
  17. +7 −0 source/CaffeineScript/SemanticTree/PlaceholderStns/namespace.js
  18. +0 −58 source/CaffeineScript/SemanticTree/StnsGeneratingJs/index.coffee
  19. +59 −0 source/CaffeineScript/SemanticTree/StnsGeneratingJs/index.js
  20. +0 −4 source/CaffeineScript/SemanticTree/StnsGeneratingJs/namespace.coffee
  21. +7 −0 source/CaffeineScript/SemanticTree/StnsGeneratingJs/namespace.js
  22. +0 −11 source/CaffeineScript/SemanticTree/TransformOnlyStns/index.coffee
  23. +12 −0 source/CaffeineScript/SemanticTree/TransformOnlyStns/index.js
  24. +0 −4 source/CaffeineScript/SemanticTree/TransformOnlyStns/namespace.coffee
  25. +7 −0 source/CaffeineScript/SemanticTree/TransformOnlyStns/namespace.js
  26. +0 −15 source/CaffeineScript/SemanticTree/index.coffee
  27. +16 −0 source/CaffeineScript/SemanticTree/index.js
  28. +0 −7 source/CaffeineScript/SemanticTree/namespace.coffee
  29. +10 −0 source/CaffeineScript/SemanticTree/namespace.js
  30. +0 −18 source/CaffeineScript/index.coffee
  31. +18 −0 source/CaffeineScript/index.js
  32. +0 −7 source/CaffeineScript/namespace.coffee
  33. +10 −0 source/CaffeineScript/namespace.js
  34. +0 −8 test/tests/CaffeineScript/.Language/index.coffee
  35. +9 −0 test/tests/CaffeineScript/.Language/index.js
  36. +0 −4 test/tests/CaffeineScript/.Language/namespace.coffee
  37. +7 −0 test/tests/CaffeineScript/.Language/namespace.js
  38. +0 −11 test/tests/CaffeineScript/Parser/Literals/index.coffee
  39. +12 −0 test/tests/CaffeineScript/Parser/Literals/index.js
  40. +0 −4 test/tests/CaffeineScript/Parser/Literals/namespace.coffee
  41. +7 −0 test/tests/CaffeineScript/Parser/Literals/namespace.js
  42. +0 −32 test/tests/CaffeineScript/Parser/index.coffee
  43. +33 −0 test/tests/CaffeineScript/Parser/index.js
  44. +0 −5 test/tests/CaffeineScript/Parser/namespace.coffee
  45. +8 −0 test/tests/CaffeineScript/Parser/namespace.js
  46. +0 −9 test/tests/CaffeineScript/Preprocessors/index.coffee
  47. +10 −0 test/tests/CaffeineScript/Preprocessors/index.js
  48. +0 −4 test/tests/CaffeineScript/Preprocessors/namespace.coffee
  49. +7 −0 test/tests/CaffeineScript/Preprocessors/namespace.js
  50. +0 −8 test/tests/CaffeineScript/Semantics/index.coffee
  51. +9 −0 test/tests/CaffeineScript/Semantics/index.js
  52. +0 −4 test/tests/CaffeineScript/Semantics/namespace.coffee
  53. +7 −0 test/tests/CaffeineScript/Semantics/namespace.js
  54. +0 −16 test/tests/CaffeineScript/index.coffee
  55. +17 −0 test/tests/CaffeineScript/index.js
  56. +0 −8 test/tests/CaffeineScript/namespace.coffee
  57. +11 −0 test/tests/CaffeineScript/namespace.js
  58. +0 −6 test/tests/index.coffee
  59. +5 −0 test/tests/index.js
  60. +0 −5 test/tests/namespace.coffee
  61. +5 −0 test/tests/namespace.js
  62. +1 −1 webpack.config.js
@@ -36,6 +36,68 @@ Syntax Highlighting


# To Sort

```coffeescript
# new & change: /// regex blocks should accept any kind of string:
new: /// "hi there"
equals: /// #{"hi there"}
equals: /hi there/
```

```coffeescript
# new feature:
foo.:bar.bob .baz
foo."bar.bob".baz
# equals:
foo["bar.bob"].baz
```

```coffeescript
# finally isn't supported?!?!
try
a
finally
b
```
```coffeescript
# Caf compile failes:
object k in-array functionsToBindList into @
if prototypeMethod = prototype[k]
fastBind prototypeMethod, @
```

```coffeescript
# what about 'unless' as a negative 'when'?
# It conflicts with tail-unless... but I really want it! Hrm.
# I think we really need a diff keyword. Consistency first, functionality second.
# The advantags is it lets us use less parenthesis
array foo in bar when !(foo in baz)
# vs
array foo in bar when-not foo in baz
# when-not may be interesting; we could also do when-exists or when-not-exists
# In other words, we could chain unary operator-tests, but as a block which keeps
# syntax-low.... maybe...
```

```coffeescript
# how hard would it be to support this CaffeineScript solution?
# It currently is a syntax error, so presumably it's really easy - i.e. it shouldn't conflict with anything.
# It should just be another custom operator, just one with a "_" rule inbetween
a not in b
```
```coffeescript
# can we fix this easy? I think so:
foo
# unindented comment before block
bar
```

```coffeescript
# OOPS! 'return' doesn't actually return
->
@@ -157,8 +157,7 @@ class ComprehensionStn extends &ScopeStnMixin &BaseStn

if byClause || shortClause || skipClause || fromObjectClause || toClause || tilClause || fromArrayClause
@generateInlineIteration comprehensionType, labeledClauses
# else if labeledClauses.toClause || labeledClauses.tilClause
# @generateArrayRange comprehensionType, labeledClauses

else
switch comprehensionType
when :each, :array, :object, :reduce
@@ -2,6 +2,5 @@
&ArtClassSystem
&Lib
&ArtStandardLib
# &CaffeineJsGen
StnRegistry: &StnRegistry
javaScriptReservedWords: &JavaScriptReservedWords
@@ -62,7 +62,7 @@ contexts:
# strings in YAML. When using single quoted strings, only single quotes
# need to be escaped: this is done by using two single quotes next to each
# other.
- match: '\b(((in|from)-)?(array|object)|super|await|delete|inject|as|with-key|extract|instanceof|return|break|into|returning|try|catch|promise|resolve|then|and|or|is|isnt|not|if|else|switch|unless|until|throw|new|while|class|extends|find|each|to|til|by|in|from|with|do|case|when|import)\b'
- match: '\b(((in|from)-)?(array|object)|super|await|delete|inject|as|with-key|extract|instanceof|return|break|into|returning|try|catch|promise|then|and|or|is|isnt|not|if|else|switch|unless|until|throw|new|while|class|extends|find|each|to|til|by|in|from|with|do|case|when|import)\b'
scope: keyword.caffeine

- match: '\b(false|true)\b'
@@ -1,5 +1,5 @@
{
"author": "Shane Brinkman-Davis Delamore, Imikimi LLC",
"author": "Shane Brinkman-Davis Delamore, Imikimi LLC\"",
"config": {
"blanket": {
"pattern": "source"
@@ -25,9 +25,9 @@
"scripts": {
"build": "caf -v -p -c cafInCaf -o source",
"perf": "nn -s;mocha -u tdd perf",
"start": "webpack-dev-server --hot --inline --progress",
"start": "webpack-dev-server --hot --inline --progress --env.devServer",
"test": "nn -s;mocha -u tdd",
"testInBrowser": "webpack-dev-server --progress"
"testInBrowser": "webpack-dev-server --progress --env.devServer"
},
"version": "0.70.18"
}

This file was deleted.

@@ -0,0 +1,9 @@
// generated by Neptune Namespaces v4.x.x
// file: Perfs/index.js

(module.exports = require('./namespace'))

.addModules({
Compile: require('./Compile'),
Parse: require('./Parse')
});

This file was deleted.

@@ -0,0 +1,8 @@
// generated by Neptune Namespaces v4.x.x
// file: Perfs/namespace.js

module.exports = require('neptune-namespaces').addNamespace(
'Perfs',
(class Perfs extends Neptune.PackageNamespace {})
._configureNamespace(require('../../package.json'))
);

This file was deleted.

@@ -0,0 +1,33 @@
// generated by Neptune Namespaces v4.x.x
// file: CaffeineScript/Rules/index.js

(module.exports = require('./namespace'))

.addModules({
Accessors: require('./Accessors'),
ArrayLiterals: require('./ArrayLiterals'),
Assignment: require('./Assignment'),
Blocks: require('./Blocks'),
Classes: require('./Classes'),
Comments: require('./Comments'),
Comprehensions: require('./Comprehensions'),
ControlStructures: require('./ControlStructures'),
DestructuringAssignment: require('./DestructuringAssignment'),
Expressions: require('./Expressions'),
Extract: require('./Extract'),
Functions: require('./Functions'),
KeywordLiterals: require('./KeywordLiterals'),
Literals: require('./Literals'),
NumberLiterals: require('./NumberLiterals'),
ObjectLiterals: require('./ObjectLiterals'),
Operators: require('./Operators'),
RegExp: require('./RegExp'),
Require: require('./Require'),
Root: require('./Root'),
Statements: require('./Statements'),
StringLiterals: require('./StringLiterals'),
TagMacros: require('./TagMacros'),
Tokens: require('./Tokens'),
ValueLists: require('./ValueLists'),
Values: require('./Values')
});

This file was deleted.

@@ -0,0 +1,7 @@
// generated by Neptune Namespaces v4.x.x
// file: CaffeineScript/Rules/namespace.js

module.exports = require('../namespace').addNamespace(
'Rules',
class Rules extends Neptune.PackageNamespace {}
);

This file was deleted.

@@ -0,0 +1,9 @@
// generated by Neptune Namespaces v4.x.x
// file: CaffeineScript/SemanticTree/PlaceholderStns/index.js

(module.exports = require('./namespace'))

.addModules({
ComprehensionValueClauseStn: require('./ComprehensionValueClauseStn'),
SemanticTokenStn: require('./SemanticTokenStn')
});

This file was deleted.

@@ -0,0 +1,7 @@
// generated by Neptune Namespaces v4.x.x
// file: CaffeineScript/SemanticTree/PlaceholderStns/namespace.js

module.exports = require('../namespace').addNamespace(
'PlaceholderStns',
class PlaceholderStns extends Neptune.PackageNamespace {}
);

This file was deleted.

@@ -0,0 +1,59 @@
// generated by Neptune Namespaces v4.x.x
// file: CaffeineScript/SemanticTree/StnsGeneratingJs/index.js

(module.exports = require('./namespace'))

.addModules({
AccessorStn: require('./AccessorStn'),
ArrayDestructuringStn: require('./ArrayDestructuringStn'),
ArraySpreadElementStn: require('./ArraySpreadElementStn'),
ArrayStn: require('./ArrayStn'),
AssignmentStn: require('./AssignmentStn'),
BinaryOperatorStn: require('./BinaryOperatorStn'),
BreakStatementStn: require('./BreakStatementStn'),
CatchStn: require('./CatchStn'),
ClassStn: require('./ClassStn'),
ControlOperatorStn: require('./ControlOperatorStn'),
DestructuringAssignmentStn: require('./DestructuringAssignmentStn'),
DestructuringIdentifierStn: require('./DestructuringIdentifierStn'),
DoStn: require('./DoStn'),
ForInControlStn: require('./ForInControlStn'),
ForStn: require('./ForStn'),
FunctionDefinitionArgsStn: require('./FunctionDefinitionArgsStn'),
FunctionDefinitionArgStn: require('./FunctionDefinitionArgStn'),
FunctionDefinitionStn: require('./FunctionDefinitionStn'),
FunctionInvocationStn: require('./FunctionInvocationStn'),
GlobalIdentifierStn: require('./GlobalIdentifierStn'),
IdentifierStn: require('./IdentifierStn'),
IfStn: require('./IfStn'),
ImportBodyStn: require('./ImportBodyStn'),
ImportStn: require('./ImportStn'),
InterpolatedStringStn: require('./InterpolatedStringStn'),
LabeledDestructuringTargetStn: require('./LabeledDestructuringTargetStn'),
LetStn: require('./LetStn'),
NewInstanceStn: require('./NewInstanceStn'),
NumberLiteralStn: require('./NumberLiteralStn'),
ObjectDestructuringStn: require('./ObjectDestructuringStn'),
ObjectLiteralAccessorStn: require('./ObjectLiteralAccessorStn'),
ObjectPropNameStn: require('./ObjectPropNameStn'),
ObjectPropValueStn: require('./ObjectPropValueStn'),
ObjectStn: require('./ObjectStn'),
PureJsStn: require('./PureJsStn'),
ReferenceStn: require('./ReferenceStn'),
RegExpStn: require('./RegExpStn'),
RequireStn: require('./RequireStn'),
ReturnStatementStn: require('./ReturnStatementStn'),
RootStn: require('./RootStn'),
SimpleLiteralStn: require('./SimpleLiteralStn'),
StatementsStn: require('./StatementsStn'),
StringStn: require('./StringStn'),
SuperStn: require('./SuperStn'),
SwitchStn: require('./SwitchStn'),
SwitchWhenStn: require('./SwitchWhenStn'),
ThisStn: require('./ThisStn'),
ThrowStn: require('./ThrowStn'),
TryStn: require('./TryStn'),
UnaryOperatorStn: require('./UnaryOperatorStn'),
UndefinedStn: require('./UndefinedStn'),
WhileStn: require('./WhileStn')
});

This file was deleted.

0 comments on commit d456945

Please sign in to comment.
You can’t perform that action at this time.