Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S Syntax Highlighting Engine
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FrameworksFrameworks
  • Syntax Highlighting Engine
  • Merge requests
  • !474

Draft: Robot syntax highlighting

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Akseli Lahtinen requested to merge work/alahtinen/robot-syntax into master Apr 08, 2023
  • Overview 0
  • Commits 3
  • Pipelines 3
  • Changes 1

I've been working on a small robot framework language syntax highlighting. Some things are a bit off still, I can't get strings to work. I recommend checking the general idea for the syntax from here: https://github.com/robocorp/robotframework-lsp/tree/master/robocorp-code I couldn't find any better source for it.

If you have any ideas how to improve this, please share!

image

Here's the above example for copy-paste testing. The syntax highlighting by gitlab is pretty spot on, so we could try to mimick them.

*** Settings ***
Documentation    Example of calling a Libarary file, Note the reason why LSP does not complain is because
...    "robot.libraries.libdoc.needsArgs" Documentation has an entry of "../libs/Example.py"
Library        ${ROOT}/libs/Example.py    ${EXAMPLE}

*** Test Cases ***
Use Lib Function
    [Tags]    Asd
    [Documentation]    Call Libarary file
    Example.Print Args

*** Settings ***
Documentation     A test suite with a single test for valid login.
...
...               This test has a workflow that is created using keywords in
...               the imported resource file.
Resource          login.resource

*** Test Cases ***
Valid Login
    Open Browser To Login Page
    Input Username    demo
    Input Password    mode
    Submit Credentials
    Welcome Page Should Be Open
    [Teardown]    Close Browser

    ${EXAMPLE} =    ebin
    #Comment
    # Commentgfdgfg
# comment
#comment 3asdasf        dfsfsd

Testi cool
    [Tags]      joo
    sdkljflsdkfjs
    IF    $var_in_py_expr1 == $var_in_py_expr2
        Call Keyword
    ELSE
        
    END
Edited Apr 08, 2023 by Akseli Lahtinen
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/alahtinen/robot-syntax