Open tin-ot opened 1 month ago
hey @tin-ot thanks for reaching out.
Did you try the preview releases? You can find them on pypi. If it works, then great. If not, then please provide a complete example, enough to reproduce it.
1) Indeed I started by trying the latest Pypi version Ans it is failing as well
2) The issue is not a specific character more the interpolation in the multiline that is failing to be parsed
here are the version
pip freeze | grep pycep pycep==1.0.4 pycep-parser==0.4.2
Here are steps to reproduce :
created bicep file will a structure of a Microsoft.Insights/scheduledQueryRules
Then :
Multi line query OK
resource myalert 'Microsoft.Insights/scheduledQueryRules@2023-03-15-preview' = {
......
allOf: [
{
query: '''AzureDiagnostics
my multiline
query without any variable
'''
.....
Multi line query NOK
resource myalert 'Microsoft.Insights/scheduledQueryRules@2023-03-15-preview' = {
......
allOf: [
{
query: format(
'''AzureDiagnostics
my multilin
query with {0} ''', myvariable
)
.....
Hope this help !
By the way I don't if it is supposed to be supported but looks like this function : cidrSubnet( ) https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-cidr#cidrsubnet is breaking parser as well
Hello,
I am currently just trying to look into the project,
It seems that there is issues to parse bicep files with multi line strings
version :
pip freeze | grep pycep pycep-parser==0.4.2
snippet
resource name 'Microsoft.Insights/scheduledQueryRules@2023-03-15-preview' = {
.....
lark.exceptions.UnexpectedCharacters: No terminal matches ''' in the current parser context, at line 35 col 13