rip-lang 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/.cursor/rules/rip-agent-onboarding.md +681 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.yml +98 -0
  3. package/.github/ISSUE_TEMPLATE/coffeescript_compatibility.yml +86 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +9 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.yml +82 -0
  6. package/.github/ISSUE_TEMPLATE/question.yml +55 -0
  7. package/.github/pull_request_template.md +84 -0
  8. package/AGENT.md +623 -0
  9. package/CONTRIBUTING.md +331 -0
  10. package/LICENSE +21 -0
  11. package/README.md +1245 -0
  12. package/SETUP.md +144 -0
  13. package/bar.coffee +394 -0
  14. package/bin/rip +162 -0
  15. package/bunfig.toml +11 -0
  16. package/docs/BROWSER.md +983 -0
  17. package/docs/CODEGEN.md +1023 -0
  18. package/docs/COFFEESCRIPT-COMPARISON.md +740 -0
  19. package/docs/COMPREHENSIONS.md +572 -0
  20. package/docs/REGEX-PLUS.md +441 -0
  21. package/docs/SOLAR.md +846 -0
  22. package/docs/SPECIAL-OPERATORS.md +769 -0
  23. package/docs/STRING.md +363 -0
  24. package/docs/WHY-NOT-COFFEESCRIPT.md +184 -0
  25. package/docs/WHY-YES-RIP.md +690 -0
  26. package/docs/WORKFLOW.md +306 -0
  27. package/docs/dist/rip.browser.js +6798 -0
  28. package/docs/dist/rip.browser.min.js +242 -0
  29. package/docs/dist/rip.browser.min.js.br +0 -0
  30. package/docs/example.html +177 -0
  31. package/docs/examples/README.md +154 -0
  32. package/docs/examples/arrows.rip +84 -0
  33. package/docs/examples/async-await.rip +59 -0
  34. package/docs/examples/existential.rip +86 -0
  35. package/docs/examples/fibonacci.rip +12 -0
  36. package/docs/examples/module.rip +38 -0
  37. package/docs/examples/object-syntax.rip +74 -0
  38. package/docs/examples/prototype.rip +30 -0
  39. package/docs/examples/ranges.rip +45 -0
  40. package/docs/examples/switch.rip +50 -0
  41. package/docs/examples/ternary.rip +36 -0
  42. package/docs/examples/use-loader.js +9 -0
  43. package/docs/examples/utils.rip +20 -0
  44. package/docs/index.html +65 -0
  45. package/docs/repl.html +914 -0
  46. package/docs/rip-1280w.png +0 -0
  47. package/docs/rip.svg +4 -0
  48. package/package.json +52 -0
  49. package/rip-loader.ts +27 -0
  50. package/scripts/build-browser.js +76 -0
  51. package/scripts/serve.js +71 -0
  52. package/src/browser.js +97 -0
  53. package/src/codegen.js +4808 -0
  54. package/src/compiler.js +270 -0
  55. package/src/grammar/grammar.rip +801 -0
  56. package/src/grammar/solar.rip +1056 -0
  57. package/src/lexer.js +3145 -0
  58. package/src/parser.js +352 -0
  59. package/src/repl.js +423 -0
  60. package/test/rip/assignment.rip +115 -0
  61. package/test/rip/async.rip +361 -0
  62. package/test/rip/basic.rip +171 -0
  63. package/test/rip/classes.rip +167 -0
  64. package/test/rip/compatibility.rip +338 -0
  65. package/test/rip/comprehensions.rip +104 -0
  66. package/test/rip/control.rip +177 -0
  67. package/test/rip/data.rip +215 -0
  68. package/test/rip/errors.rip +129 -0
  69. package/test/rip/functions.rip +443 -0
  70. package/test/rip/guards.rip +247 -0
  71. package/test/rip/literals.rip +131 -0
  72. package/test/rip/loops.rip +117 -0
  73. package/test/rip/modules.rip +87 -0
  74. package/test/rip/operators.rip +158 -0
  75. package/test/rip/optional.rip +184 -0
  76. package/test/rip/properties.rip +94 -0
  77. package/test/rip/regex.rip +301 -0
  78. package/test/rip/stabilization.rip +825 -0
  79. package/test/rip/strings.rip +483 -0
  80. package/test/runner.js +329 -0
@@ -0,0 +1,98 @@
1
+ name: Bug Report
2
+ description: Report a bug or unexpected behavior in Rip
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to report a bug! Please fill out the sections below to help us fix the issue.
10
+
11
+ - type: textarea
12
+ id: description
13
+ attributes:
14
+ label: Description
15
+ description: A clear description of what the bug is
16
+ placeholder: Describe what happened and what you expected to happen
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: code
22
+ attributes:
23
+ label: Rip Code
24
+ description: The Rip code that triggers the bug
25
+ placeholder: |
26
+ # Example:
27
+ x = for i in [1..10] by 2
28
+ i * 2
29
+ render: coffeescript
30
+ validations:
31
+ required: true
32
+
33
+ - type: textarea
34
+ id: expected
35
+ attributes:
36
+ label: Expected Behavior
37
+ description: What you expected to happen
38
+ placeholder: Should compile to...
39
+ validations:
40
+ required: true
41
+
42
+ - type: textarea
43
+ id: actual
44
+ attributes:
45
+ label: Actual Behavior
46
+ description: What actually happened (error message, unexpected output, etc.)
47
+ placeholder: |
48
+ Error: ...
49
+ or
50
+ Generated incorrect JavaScript: ...
51
+ render: shell
52
+ validations:
53
+ required: true
54
+
55
+ - type: input
56
+ id: version
57
+ attributes:
58
+ label: Rip Version
59
+ description: Run `./bin/rip --version` or check package.json
60
+ placeholder: "1.0.0"
61
+ validations:
62
+ required: false
63
+
64
+ - type: dropdown
65
+ id: runtime
66
+ attributes:
67
+ label: Runtime
68
+ description: Which JavaScript runtime are you using?
69
+ options:
70
+ - Bun
71
+ - Node.js
72
+ - Deno
73
+ - Browser
74
+ - Other
75
+ validations:
76
+ required: false
77
+
78
+ - type: textarea
79
+ id: debug
80
+ attributes:
81
+ label: Debug Output (Optional)
82
+ description: |
83
+ If helpful, include output from debug flags:
84
+ - `./bin/rip -t your-file.rip` (tokens)
85
+ - `./bin/rip -s your-file.rip` (s-expressions)
86
+ - `./bin/rip -c your-file.rip` (JavaScript output)
87
+ placeholder: Paste debug output here...
88
+ render: javascript
89
+ validations:
90
+ required: false
91
+
92
+ - type: textarea
93
+ id: context
94
+ attributes:
95
+ label: Additional Context
96
+ description: Any other context about the problem (CoffeeScript migration, specific use case, etc.)
97
+ validations:
98
+ required: false
@@ -0,0 +1,86 @@
1
+ name: CoffeeScript Compatibility Issue
2
+ description: Report CoffeeScript code that doesn't compile or work correctly in Rip
3
+ title: "[Compatibility]: "
4
+ labels: ["compatibility", "coffeescript"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Migrating from CoffeeScript? Report code that works in CoffeeScript but fails in Rip.
10
+
11
+ - type: textarea
12
+ id: coffeescript
13
+ attributes:
14
+ label: CoffeeScript Code
15
+ description: The CoffeeScript code that works in CoffeeScript 2.x
16
+ placeholder: |
17
+ # Example:
18
+ result = (x for x in [1..10] by 2)
19
+ render: coffeescript
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: error
25
+ attributes:
26
+ label: Error in Rip
27
+ description: What happens when you try to compile this with Rip?
28
+ placeholder: |
29
+ Compilation Error: ...
30
+ or
31
+ Generates incorrect output: ...
32
+ render: shell
33
+ validations:
34
+ required: true
35
+
36
+ - type: textarea
37
+ id: coffeescript-output
38
+ attributes:
39
+ label: CoffeeScript Output (Optional)
40
+ description: What JavaScript does CoffeeScript generate for this?
41
+ placeholder: |
42
+ // CoffeeScript 2.x generates:
43
+ var result = ...
44
+ render: javascript
45
+ validations:
46
+ required: false
47
+
48
+ - type: dropdown
49
+ id: priority
50
+ attributes:
51
+ label: Impact
52
+ description: How important is this for your migration?
53
+ options:
54
+ - Blocking migration
55
+ - High - affects many files
56
+ - Medium - affects some files
57
+ - Low - easy to work around
58
+ validations:
59
+ required: false
60
+
61
+ - type: textarea
62
+ id: workaround
63
+ attributes:
64
+ label: Workaround (if known)
65
+ description: Have you found a way to rewrite the code to work with Rip?
66
+ placeholder: |
67
+ Instead of:
68
+ x for x in arr by 2
69
+ Use:
70
+ for x in arr by 2
71
+ x
72
+ render: coffeescript
73
+ validations:
74
+ required: false
75
+
76
+ - type: checkboxes
77
+ id: verification
78
+ attributes:
79
+ label: Verification
80
+ description: Please confirm
81
+ options:
82
+ - label: This code works in CoffeeScript 2.x
83
+ required: true
84
+ - label: I've tested with the latest version of Rip
85
+ required: false
86
+
@@ -0,0 +1,9 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: 📚 Documentation
4
+ url: https://github.com/shreeve/rip-lang/tree/main/docs
5
+ about: Read the comprehensive documentation (CODEGEN.md, COMPREHENSIONS.md, SOLAR.md, etc.)
6
+ - name: 💬 Discussions
7
+ url: https://github.com/shreeve/rip-lang/discussions
8
+ about: Ask questions, share ideas, and discuss Rip with the community
9
+
@@ -0,0 +1,82 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature or enhancement for Rip
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for suggesting a feature! Please provide as much detail as possible.
10
+
11
+ - type: textarea
12
+ id: description
13
+ attributes:
14
+ label: Feature Description
15
+ description: A clear description of the feature you'd like to see
16
+ placeholder: Describe the feature...
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: use-case
22
+ attributes:
23
+ label: Use Case
24
+ description: Why would this feature be useful? What problem does it solve?
25
+ placeholder: |
26
+ I often need to...
27
+ This would help with...
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ id: syntax
33
+ attributes:
34
+ label: Proposed Syntax (Optional)
35
+ description: If you have ideas for how this should look in Rip
36
+ placeholder: |
37
+ # Example:
38
+ result = something new
39
+ render: coffeescript
40
+ validations:
41
+ required: false
42
+
43
+ - type: textarea
44
+ id: javascript
45
+ attributes:
46
+ label: Expected JavaScript Output (Optional)
47
+ description: What JavaScript should this compile to?
48
+ placeholder: |
49
+ // Example:
50
+ const result = ...
51
+ render: javascript
52
+ validations:
53
+ required: false
54
+
55
+ - type: dropdown
56
+ id: compatibility
57
+ attributes:
58
+ label: CoffeeScript Compatibility
59
+ description: Does CoffeeScript have this feature?
60
+ options:
61
+ - "Yes - CoffeeScript has this"
62
+ - "No - This is new"
63
+ - "Not sure"
64
+ validations:
65
+ required: false
66
+
67
+ - type: textarea
68
+ id: alternatives
69
+ attributes:
70
+ label: Alternatives Considered
71
+ description: Are there workarounds or alternative approaches you've tried?
72
+ placeholder: Currently I have to...
73
+ validations:
74
+ required: false
75
+
76
+ - type: textarea
77
+ id: context
78
+ attributes:
79
+ label: Additional Context
80
+ description: Any other relevant information
81
+ validations:
82
+ required: false
@@ -0,0 +1,55 @@
1
+ name: Question / Discussion
2
+ description: Ask a question or start a discussion about Rip
3
+ title: "[Question]: "
4
+ labels: ["question"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Have a question about Rip? Need help understanding something? Let us know!
10
+
11
+ - type: textarea
12
+ id: question
13
+ attributes:
14
+ label: Your Question
15
+ description: What would you like to know?
16
+ placeholder: How do I...? / Why does Rip...? / What's the difference between...?
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: code
22
+ attributes:
23
+ label: Related Code (Optional)
24
+ description: If your question involves specific code, paste it here
25
+ placeholder: |
26
+ # Example:
27
+ x = 42
28
+ render: coffeescript
29
+ validations:
30
+ required: false
31
+
32
+ - type: textarea
33
+ id: context
34
+ attributes:
35
+ label: What You've Tried (Optional)
36
+ description: Have you checked the documentation? Tried any approaches?
37
+ placeholder: |
38
+ I looked at...
39
+ I tried...
40
+ validations:
41
+ required: false
42
+
43
+ - type: checkboxes
44
+ id: docs-check
45
+ attributes:
46
+ label: Documentation Checked
47
+ description: Which docs have you reviewed? (Just curious!)
48
+ options:
49
+ - label: README.md
50
+ - label: AGENT.md
51
+ - label: docs/CODEGEN.md
52
+ - label: docs/COMPREHENSIONS.md
53
+ - label: docs/SOLAR.md
54
+ - label: Other docs in docs/ folder
55
+
@@ -0,0 +1,84 @@
1
+ ## Description
2
+
3
+ <!-- Describe your changes in detail -->
4
+
5
+ ## Motivation
6
+
7
+ <!-- Why is this change needed? What problem does it solve? -->
8
+ <!-- If it fixes an issue, link to it here: Fixes #123 -->
9
+
10
+ ## Type of Change
11
+
12
+ <!-- Mark the relevant option with an [x] -->
13
+
14
+ - [ ] Bug fix (non-breaking change that fixes an issue)
15
+ - [ ] New feature (non-breaking change that adds functionality)
16
+ - [ ] Breaking change (fix or feature that would cause existing functionality to change)
17
+ - [ ] Documentation update
18
+ - [ ] Grammar/parser change (requires `bun run parser`)
19
+ - [ ] Test addition/update
20
+
21
+ ## Changes Made
22
+
23
+ <!-- List the specific changes -->
24
+
25
+ -
26
+ -
27
+
28
+ ## Testing
29
+
30
+ <!-- How did you test this? -->
31
+
32
+ - [ ] All existing tests pass (`bun run test`)
33
+ - [ ] Added new tests for this change
34
+ - [ ] Tested with Bun
35
+ - [ ] Tested in browser (if relevant)
36
+ - [ ] Tested specific edge cases: <!-- describe -->
37
+
38
+ **Test Results:**
39
+ ```
40
+ ✓ X passing
41
+ ✗ 0 failing
42
+ ```
43
+
44
+ ## Debug Output (if relevant)
45
+
46
+ <details>
47
+ <summary>S-expressions (`./bin/rip -s`)</summary>
48
+
49
+ ```javascript
50
+ // Paste s-expression output here
51
+ ```
52
+ </details>
53
+
54
+ <details>
55
+ <summary>Generated JavaScript (`./bin/rip -c`)</summary>
56
+
57
+ ```javascript
58
+ // Paste JavaScript output here
59
+ ```
60
+ </details>
61
+
62
+ ## Documentation
63
+
64
+ <!-- Have you updated the relevant documentation? -->
65
+
66
+ - [ ] Updated `docs/CODEGEN.md` (if adding/changing node types)
67
+ - [ ] Updated `README.md` (if user-facing change)
68
+ - [ ] Updated `AGENT.md` (if relevant for AI/developers)
69
+ - [ ] Added inline code comments
70
+ - [ ] No documentation changes needed
71
+
72
+ ## Checklist
73
+
74
+ - [ ] My code follows the existing code style
75
+ - [ ] I have tested my changes thoroughly
76
+ - [ ] All tests pass
77
+ - [ ] I have updated documentation as needed
78
+ - [ ] I have added tests that prove my fix is effective or that my feature works
79
+ - [ ] My commit messages are clear and descriptive
80
+
81
+ ## Additional Notes
82
+
83
+ <!-- Any other context, concerns, or discussion points -->
84
+