Skip to content

Conversation

@taiseiue
Copy link
Member

  • テストを書いた
  • Roslyn分析ciを入れた
  • Parser、ParsingScriptのリファクタリングをした

@taiseiue taiseiue requested a review from Copilot September 13, 2025 20:16
@taiseiue taiseiue self-assigned this Sep 13, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors the Parser and ParsingScript classes for better code maintainability and performance. Key changes include consolidating property getters for settings inheritance, optimizing the main parsing loop, and adding type system improvements.

  • Simplified property getters using a shared helper method for settings inheritance
  • Refactored the main parsing loop to eliminate goto statements and improve readability
  • Enhanced type matching logic in TypeObject for better compatibility checks

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Losetta/Parsing/ParsingScript.cs Refactored property getters to use shared inheritance helper method, optimized line number lookup algorithm
Losetta/Parsing/Parser.cs Eliminated goto statements in main parsing loop, optimized operator priority lookup with dictionary, fixed typo in enum name
Losetta/Objects/TypeObject.cs Enhanced type matching logic for better .NET type compatibility and null handling
Losetta.Tests/Losetta/Scripting/Expression/Operator/TypeOperator.cs Added comprehensive tests for type operators (is, as, is not)
Losetta.Tests/Losetta/Scripting/Expression/Operator/NumberPre.cs Added tests for pre-increment/decrement operators with temporary ignore flags
Directory.Build.props Added Roslyn analyzer configuration for code quality enforcement
.github/workflows/roslyn-analysis.yml Added CI workflow for Roslyn code analysis
.github/workflows/roslyn-analysis-strict.yml Added strict CI workflow that treats warnings as errors
Comments suppressed due to low confidence (1)

Losetta.Tests/Losetta/Scripting/Expression/Operator/NumberPre.cs:13

  • [nitpick] The spacing around the unary plus operator should be consistent. Use either x => +x or x => + x throughout the file.
        TestUtils.TestExpression(Constants.PLUS, val, x => +x);

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@taiseiue taiseiue merged commit f5cc5b8 into develop Sep 13, 2025
6 checks passed
@taiseiue taiseiue deleted the taiseiue/refactor-something branch September 13, 2025 20:28
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