Skip to content
This repository was archived by the owner on Jan 15, 2023. It is now read-only.
This repository was archived by the owner on Jan 15, 2023. It is now read-only.

Do not treat true and false as special token types and keywords  #30

@AlekSi

Description

@AlekSi

Currently true and false are treated as keywords:

gosh/scanner/scanner.go

Lines 61 to 63 in 5198cfb

// TODO remove - those are not keywords
"true": tokens.True,
"false": tokens.False,

But they are normal predeclared identifiers like println. We should treat them as such. We also should remove special token types for them.

Scanner and parser should return them as identifiers, and they should be added into built-in objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or improvementhelp wantedSmall and self-contained issues for new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions