Sha256: 3764a41eefe9af47271b1c68df68fea084a7ef12869fe8922a8010065533bd63

Contents?: true

Size: 1.39 KB

Versions: 5

Compression:

Stored size: 1.39 KB

Contents

using System;

namespace Demo.Ns
{
  /// sample class
  public class ClassSample : Base
  {
    /* sample multiline comment */
#region region sample
    fieldSample : int;
#endregion

    public virtual someMethod(str : string) : list[double]
    {
      def x = "simple string";
      def x = $"simple $splice string $(spliceMethod())";
      def x = <#
        recursive <# string #> sample
      #>;
      def x = $<#
        recursive $splice <# string #> sample
      #>;

      def localFunc(arg)
      {
         arg + 1;
      }

      match (localFunc(2))
      {
        | 3 => "ok";
        | _ => "fail";
      }

      using (x = SomeObject())
      {
        foreach (item in someCollection)
        {
          def i = try
          {
            int.Parse(item)
          }
          catch
          {
            | _ is FormatException => 0;
          }
          when (i > 0xff)
            unless (i < 555L)
              WriteLine(i);
          
        }
      }
      protected override overrideSample() : void
      {}

      private privateSample() : void
      {}

      public abstract abstractSample() : void
      {}
    }

  }

  module ModuleSample
  {
  }

  variant RgbColor {
   | Red
   | Yellow
   | Green
   | Different {
       red : float;
       green : float;
       blue : float;
     }
  }

  macro sampleMacro(expr)
  syntax ("write", expr)
  {
    <[ WriteLine($expr) ]>
  }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pygments.rb-0.2.4 vendor/pygments-main/tests/examplefiles/nemerle_sample.n
pygments.rb-0.2.3 vendor/pygments-main/tests/examplefiles/nemerle_sample.n
pygments.rb-0.2.2 vendor/pygments-main/tests/examplefiles/nemerle_sample.n
pygments.rb-0.2.1 vendor/pygments-main/tests/examplefiles/nemerle_sample.n
pygments.rb-0.2.0 vendor/pygments-main/tests/examplefiles/nemerle_sample.n