Community
    • Login

    User Defined language multiple questions

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    udl
    23 Posts 2 Posters 3.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EkopalypseE
      Ekopalypse
      last edited by

      Midnight here - unless someone else takes over I will follow up on this tomorrow.

      1 Reply Last reply Reply Quote 1
      • Spiralo-IdioideS
        Spiralo-Idioide
        last edited by

        Thnks a lot for now.
        I tried what you said but I still have problems.

        • Only functions defined by ‘to’ are recognized.

        • The function are listed with the arguments in their name. For example :

        to playABC s instr beatsPerMinute transposition {
          if (isNil instr) { instr = 'piano' }
          if (isNil beatsPerMinute) { beatsPerMinute = 120 }
          if (isClass instr 'String') {
        	instrument = (newSampledInstrument instr)
          } (isClass instr 'Array') {
        	instrument = (sampledInstrumentFromSamples instr)
          } else {
        	return nil
          }
          scorePlayer = (newScorePlayer instrument beatsPerMinute)
          voice = (parse (new 'ABCParser') s)
          if (notNil transposition) { transpose (new 'ABCParser') voice transposition }
          addVoice scorePlayer voice
          playScore scorePlayer
          return scorePlayer
        }
        

        Here, the name of the function is just ‘playABC’. Without ‘instr’, ‘beatsPerMinute’ and ‘transposition’.

        Thanks a lot for all of this. But don’t hurry to help I won’t be able to answer for two weeks.

        EkopalypseE 1 Reply Last reply Reply Quote 2
        • EkopalypseE
          Ekopalypse @Spiralo-Idioide
          last edited by

          @Spiralo-Idioide

          Only functions defined by ‘to’ are recognized.

          :-) That’s no wonder as it isn’t included yet. Therefore my statement
          The open part is how a class and its methods are defined. Is not part of your sample code. :-)

          The function are listed with the arguments in their name. For example :

          Yes, as I don’t know this language and don’t know how you wanted it to be reported
          I used <nameExpr expr=".*" /> which returns the whole line. For example, a change to
          <nameExpr expr="\w+" /> would return the first word after to.

          But don’t hurry to help I won’t be able to answer for two weeks.

          No problem. Just respond when you are back to this thread and we can go on.
          As said, I need the class and its method definitions as an example.

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors