Skip to content

Conversation

Alexiscomete
Copy link
Member

  • u32 type only
  • column in tokens
  • error display (base) and hints
  • create a variable
  • edit a variable
  • do basic calculations with u32
  • print variable (with or without a new line)
  • get user input
  • assert that two values are equal
Copilot

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Alexiscomete Alexiscomete requested a review from Copilot July 7, 2025 16:02
Copy link

@Copilot 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 PR adds core execution support for the SKR language, introduces a CharsIterator to track token positions, and implements native calls (print, println, read_int, assert_eq) with detailed error handling and hints.

  • Refactor tokenizer to CharsIterator carrying line/column information
  • Implement ExecutionContext, AST Evaluate/Execute traits, and native calls
  • Update all GraphDisplay impls to include indentation for clearer flowcharts

Reviewed Changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test1, test2, test3 Added flowchart outputs for basic calculations and variable ops
test.skrb Updated example script to use new syntax and demonstrate calls
src/utils.rs Enhanced cross‐platform clear using ANSI codes and improved doc
src/tokens.rs Refactored tokenizer to use CharsIterator for line/column info
src/execute.rs Built ExecutionContext, variable scopes, native call handling
src/parse/nodes/* Added Evaluate/Execute impls and updated GraphDisplay APIs
src/main.rs Improved CLI flow, --show-ast, colored output, error handling
README.md Markdown formatting fix
Cargo.toml Added colored dependency
Comments suppressed due to low confidence (1)

src/execute.rs:5

  • [nitpick] Aliasing primitives as OperationI/OperationO can be confusing; consider using more descriptive names such as EvalInput/EvalResult or Value/Result to clarify their roles.
pub type OperationI = u32; 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant