Skip to content

Function List is parsing contents of string literals #3560

@s--g

Description

@s--g

Description of the Issue

The Function List plugin is parsing the contents of string literals in PHP files and interpreting the slash-asterix (/*) combination as a comment. This is causing the Function List to stop working.

Steps to Reproduce the Issue

  1. Create a new PHP document and paste in the following code:
<?php

class Test
 {
	protected function test()
	{
		glob('data/*.txt');  // PROBLEM
	}
    
	/**
	 * @return bool
	 */
	public function test2()
	{
		
	}
}
  1. Save the file

Expected Behavior

I expect the Function List to show a hierarchy of the class including the class name and both functions

Actual Behavior

The Function List shows nothing. The "/*" within the string being passed to the glob function has confused it into thinking it's an unterminated comment I assume.

Debug Information

Notepad++ v7.4.2 (32-bit)
Build time : Jun 18 2017 - 23:34:19
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : Explorer.dll mimeTools.dll NppConverter.dll NppExport.dll PluginManager.dll

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