Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • D dte
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 41
    • Issues 41
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Craig Barnes
  • dte
  • Merge requests
  • !16

Inlist buffering

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Kevin Hovsäter requested to merge hovsater/dte:feature/inlist-buffering into master Sep 14, 2022
  • Overview 1
  • Commits 2
  • Pipelines 1
  • Changes 5

The rational for this pull request is described below. Feel free to close this pull request if you don't think it makes sense.

Rational

Sometimes you may need to "peek ahead" in order to determine if the inlist conditional is valid or not. A good example for this is highlighting types in Odin. Let's say I want to highlight f32 as a type. This can easily be achived using list type f32 and the inlist conditional. However, you may want to highlight type casts differently. In Odin, you can cast the integer 2 to an f32 using cast(f32)2 or the shorthand f32(2). In order to determine whether or not the currently matched f32 is a type or type cast, we need to check the next byte.

Implementation

inlist now accepts an optional flag, -b, similiar to noeat.

Edited Sep 15, 2022 by Kevin Hovsäter
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/inlist-buffering