Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 13, 2025

Summary

This PR implements Stroustrup-style formatting for C++ type identifiers in the CSharpToCpp transformer, as requested in issue #60.

Changes Made

  • Reference types: Changed from Type &var to Type& var (attach & to type)
  • Pointer types: Changed from Type *var to Type* var (attach * to type)
  • Consistent formatting: Applied across all transformation rules

Specific Patterns Fixed

const Key &otherconst Key& other
std::ostream &outstd::ostream& out
const A &objconst A& obj
const Platform::Ranges::Range<T> &objconst Platform::Ranges::Range<T>& obj
void *sendervoid* sender
IDisposable &disposableIDisposable& disposable
AbstractType *variableAbstractType* variable
void *xvoid* x

Testing

  • ✅ All existing unit tests pass
  • ✅ Project builds successfully without errors
  • ✅ Generated C++ code follows Stroustrup style guidelines

Test Plan

  • Run existing unit tests to ensure no regressions
  • Verify build succeeds
  • Manually verify generated patterns follow correct style

Fixes #60

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #60
@konard konard self-assigned this Sep 13, 2025
- Change reference patterns from 'Type &var' to 'Type& var'
- Change pointer patterns from 'Type *var' to 'Type* var'
- Apply consistent Stroustrup style across all C++ type transformations
- Ensures generated C++ code follows modern style guidelines

Fixes #60

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Use Stroustrup-style for type identificators Use Stroustrup-style for C++ type identifiers Sep 13, 2025
@konard konard marked this pull request as ready for review September 13, 2025 09:44
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.

Use Stroustrup-style for type identificators

2 participants