Skip to content

📝 docs(lang): add shift operator documentation#1318

Merged
harehare merged 2 commits intofeat/shift-header-levelfrom
copilot/sub-pr-1315
Feb 22, 2026
Merged

📝 docs(lang): add shift operator documentation#1318
harehare merged 2 commits intofeat/shift-header-levelfrom
copilot/sub-pr-1315

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

Adds reference documentation for the << and >> shift operators, which were missing from the operator docs despite being implemented.

Changes

  • docs/books/src/reference/operators.md — new "Shift Operators" section covering:
    • Behavior table per operand type (number, string, Markdown heading)
    • Examples for both operator syntax and equivalent shift_left/shift_right function call syntax

Behavior summary

Operand << (left shift) >> (right shift)
Number Bitwise left shift (1 << 24) Bitwise right shift (4 >> 21)
String Remove n chars from start ("hello" << 2"llo") Remove n chars from end ("hello" >> 2"hel")
Heading Decrease depth / promote (## << 1#, min 1) Increase depth / demote (# >> 1##, max 6)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add left shift and right shift token kinds and operations 📝 docs(lang): add shift operator documentation Feb 22, 2026
Copilot AI requested a review from harehare February 22, 2026 01:56
@harehare harehare marked this pull request as ready for review February 22, 2026 03:23
@harehare harehare merged commit 1269e86 into feat/shift-header-level Feb 22, 2026
@harehare harehare deleted the copilot/sub-pr-1315 branch February 22, 2026 03:23
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