ballerina-platform / ballerina-lang

The Ballerina Programming Language
https://ballerina.io/
Apache License 2.0
3.58k stars 738 forks source link

[New Feature]: No API to get the location of a `NodeList` #42867

Closed lochana-chathura closed 1 week ago

lochana-chathura commented 3 months ago

Description

$subject.

Encountered this requirement to @TharmiganK when getting the location of absolute-resource-path in service socialMedia:Service /social\-media/api on new http:Listener(8080).

We can get the location of the NodeList from underlyingListNode().location(). However, underlyingListNode() is not exposed to public.

So, I think we can implement an API location() from NodeList class which returns underlyingListNode().location().

lochana-chathura commented 3 months ago

This seems like a common requirement. However, I wonder how we didn't encounter such until today. :)

CC: @rdulmina @sameerajayasoma

MaryamZi commented 1 week ago

Closing this issue for now since we don't plan on addressing it immediately.