Editor Guide
OSC2 Studio's editor provides a professional editing experience for OpenSCENARIO 2, with syntax highlighting, intelligent auto-completion, and real-time error detection.
Real-time Error Detection
The editor includes a built-in validation engine that checks for errors automatically as you type:
- Syntax Validation: Checks for syntax errors in real-time, underlining errors with red squiggly lines
- Semantic Validation: Type checking, scope analysis, and other semantic checks — also marked with red squiggly lines
- Validation runs automatically in the background — no manual triggering needed
Syntax Highlighting
The editor supports syntax highlighting for OSC2 language keywords. Different types of keywords and syntactic elements are color-coded:
- Keywords:
scenario,do,with,serial,parallel, etc. - Types:
vehicle,pedestrian, etc. - Modifiers:
speed,position, etc. - Comments: Displayed in distinct colors
Auto-completion
The editor provides code auto-completion for OSC2 language:
- Keyword Completion: Suggestions appear automatically as you type
- Context Awareness: Suggestions are filtered based on the current code context
- Code Snippets: Ready-to-use code templates for quick insertion
Other Features
- Bracket Matching: Automatically highlights matching bracket pairs
- Code Folding: Collapse/expand code blocks
- Line Numbers: Line numbers on the left for easy reference