Skip to content

Custom literals  #4

@jmatsushita

Description

@jmatsushita

Hi there,

Thanks for the great project! I bumped into it while looking for implementations of algebraic property graphs 👍

I'm wondering if I'm correct that custom literals aren't parsed in the tasl DSL yet? This example from the docs https://tasl.io/docs/literals doesn't parse:

namespace ex http://example.com/
namespace xsd http://www.w3.org/2001/XMLSchema#

literal myCustomLiteralName ex:hello/world
literal integer xsd:integer

class ex:Thing {
  ex:foo -> myCustomLiteralName
  ex:bar -> integer
}

I get the following error:

  SyntaxError {
    message: 'No parse at 82',
  }

  › Parse.advance (file://node_modules/@lezer/lr/dist/index.js:1101:23)
  › LRParser.parse (file://node_modules/@lezer/common/dist/index.js:1272:30)
  › parseSchema (file://src/schema/parseSchema.ts:10:17)
  › file://test/schema.test.ts:104:17

Also maybe you can answer this question underlay/underlay.org#129 about underlay and tasl?

Thanks!

Jun

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions