Skip to content

Implements math lib short#33

Merged
ggulpari merged 9 commits intomainfrom
implements-math-lib-short
Nov 20, 2025
Merged

Implements math lib short#33
ggulpari merged 9 commits intomainfrom
implements-math-lib-short

Conversation

@Slashmsu
Copy link
Copy Markdown
Collaborator

🎉 Pull Request

Description

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality
    to not work as expected)
  • 📚 Documentation update
  • 🔧 Configuration/build changes
  • ✅ Test improvements
  • ♻️ Code refactoring (no functional changes)

Related Issue

Fixes #(issue number)

Changes Made

Testing

  • All existing tests pass (npm test)
  • Added new tests for the changes
  • Tested manually with examples
  • Linting passes (npm run lint)
  • Type checking passes (npm run type-check)

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Context


📋 License Information

SomonScript is open source software licensed under the MIT License.

By submitting this pull request, you agree that your contributions will be
licensed under the MIT License.

For contribution guidelines, please review:


Thank you for contributing to SomonScript! 🚀

Replace underscore-separated method names with camelCase equivalents
(e.g., 'гуруҳ_охир' → 'гуруҳОхир', 'вақт_сабт' → 'вақтСабт')
for consistency with Tajik naming conventions.

Updated 80+ identifier mappings across:
- Array methods (copyWithin, findIndex, flatMap, forEach, etc.)
- String methods (charAt, codePointAt, padStart, replaceAll, etc.)
- Math methods (acosh, asinh, atanh, hypot, etc.)
- Object methods (defineProperties, getOwnPropertyDescriptor, etc.)

All tests passing (1233 tests).
Replace all instances of 'тағйирёбанда' with the shorter 'тағ' keyword
throughout the quick-start documentation and related test files.

Changes:
- docs/reference/quick-start.md: Update all variable declarations
- tests/stdlib-array.test.ts: Update test setup code
- tests/stdlib-string.test.ts: Update test setup code

This aligns the documentation and tests with the new short keyword
introduced for improved code brevity.
Add support for using built-in identifiers and keywords as
function parameter names, enabling proper parsing of arrow
functions with Tajik method names. Update examples to use new
camelCase naming convention.

Changes:
- parser.ts: Allow built-in identifiers and keywords as
  parameter names
- examples/29-generics.som: Replace ҷудокунӣ with пайвастКардан
- examples/35-advanced-backend-patterns.som: Remove unnecessary
  await keywords
@Slashmsu Slashmsu requested a review from ggulpari November 20, 2025 09:30
@Slashmsu Slashmsu self-assigned this Nov 20, 2025
@github-actions
Copy link
Copy Markdown

✅ Tests completed on Node.js 20.x: success

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/codegen.ts
Comment thread src/codegen.ts
Add support for underscore-separated variants of camelCase method names
to maintain backward compatibility (e.g., 'гуруҳ_охир' alongside 'гуруҳОхир',
'вақт_сабт' alongside 'вақтСабт').

Changes:
- codegen.ts: Add underscore variants to builtin mappings for console
  methods (гуруҳ_охир, гуруҳ_пӯшида, вақт_охир, вақт_сабт, қайд_асл,
  xml_феҳрист) and string methods (сатр_
@Slashmsu
Copy link
Copy Markdown
Collaborator Author

@codex review

@github-actions
Copy link
Copy Markdown

✅ Tests completed on Node.js 20.x: success

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json Outdated
@Slashmsu
Copy link
Copy Markdown
Collaborator Author

https://github.com/codex review

@github-actions
Copy link
Copy Markdown

❌ Tests completed on Node.js 20.x: failure

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

✅ Tests completed on Node.js 20.x: success

@ggulpari ggulpari merged commit 02609ae into main Nov 20, 2025
7 checks passed
@ggulpari ggulpari deleted the implements-math-lib-short branch November 20, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants